Skip to content

Instantly share code, notes, and snippets.

@leto
Created May 21, 2010 03:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save leto/408411 to your computer and use it in GitHub Desktop.
Parrot interp creation error
This code:
#include "parrot/embed.h"
#include "parrot/extend.h"
Parrot_Interp interp1, interp2;
int main()
{
interp1 = Parrot_new(NULL);
imcc_initialize(interp1);
interp2 = Parrot_new(NULL);
imcc_initialize(interp2);
}
compiled with this command: cc test.c -o test `pkg-config --cflags --libs parrot`
gives this backtrace:
src/thread.c:1398: failed assertion '!interpreter_array'
Backtrace - Obtained 9 stack frames (max trace depth is 32).
0 libparrot.dylib 0x0033a64d Parrot_find_encoding_converter + 221
1 libparrot.dylib 0x0033a7b7 Parrot_confess + 151
2 libparrot.dylib 0x003a0dc3 pt_thread_create + 6179
3 libparrot.dylib 0x00397f48 enable_event_checking + 9240
4 libparrot.dylib 0x00355d2b initialize_interpreter + 811
5 libparrot.dylib 0x00355da4 make_interpreter + 52
6 libparrot.dylib 0x00337cd0 Parrot_new + 32
7 test 0x00001fd9 main + 67
8 test 0x00001f6a start + 54
@leto
Copy link
Author

leto commented May 21, 2010

=item C<Parrot_Interp Parrot_new(Parrot_Interp parent)>

Creates a new interpreter, inheriting some data structures from a parent
interpreter, if supplied. The first interpreter in any process should be
created with a NULL parent, and all subsequent interpreters in the same
process should use the first interpreter as their parent. Failure to do so
may result in unpredictable errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment