Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literate gives out-of-bounds error with certain code_types #18

Open
sobjornstad opened this issue Oct 17, 2017 · 0 comments
Open

Literate gives out-of-bounds error with certain code_types #18

sobjornstad opened this issue Oct 17, 2017 · 0 comments

Comments

@sobjornstad
Copy link

With the "Hello World in C" example in the Literate manual, if I add an @code_type declaration for many languages (ex., 'python', 'prolog', 'lisp'), I receive the following trace:

core.exception.RangeError@source/weaver.d(284): Range violation
----------------
??:? _d_arraybounds [0x56dfa3]
??:? weaver.__array [0x561873]
??:? immutable(char)[] weaver.weaveChapter(parser.Chapter, parser.Program, immutable(char)[][immutable(char)[]], immutable(char)[][][immutable(char)[]], immutable(char)[][][immutable(char)[]], immutable(char)[][][immutable(char)[]]) [0x55a8e9]
??:? void weaver.weave(parser.Program) [0x558f6f]
??:? void main.lit(immutable(char)[], immutable(char)[]) [0x50ae91]
??:? _Dmain [0x50c5b4]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5700b2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x570008]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x57006e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x570008]
??:? _d_run_main [0x56ff65]
??:? main [0x50c6fb]
??:? __libc_start_main [0x782a8f44]

This does not happen with an @code_type of c, and indeed the program weaves fine that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant