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

Build failure on latest Parrot after invocation spec refactor #74

Closed
gerdr opened this issue Feb 1, 2013 · 3 comments
Closed

Build failure on latest Parrot after invocation spec refactor #74

gerdr opened this issue Feb 1, 2013 · 3 comments

Comments

@gerdr
Copy link
Contributor

gerdr commented Feb 1, 2013

NQP aaf85c3 builds successfully on parrot/parrot@5fc1831, whereas 6005a68 (or later) does not.

Any invocation of the nqp executable will fail:

$ ./nqp
too few positional arguments: 0 passed, 1 (or more) expected
current instr.: '' pc 2390 (src/stage2/gen/module_loader.pir:1050) (src/ModuleLoader.pm:157)
called from Sub '' pc 127500 (src/stage2/gen/NQP.pir:43427) (src/stage2/gen/NQP.pm:3219)
called from Sub '' pc 127526 (src/stage2/gen/NQP.pir:43437) (src/stage2/gen/NQP.pm:3219)

The listed line numbers might not be accurate.

Note: build environment is Cygwin, ie 32-bit

@gerdr
Copy link
Contributor Author

gerdr commented Feb 8, 2013

With NQP 55ae367 on Parrot parrot/parrot@b23f23e, I get an additional segfault when trying to print the error:

Program received signal SIGSEGV, Segmentation fault.
0x6f3a501f in Parrot_sub_context_get_info (interp=0x80039c38, ctx=0x801b36f4,
    info=0x28a9a8) at src/sub.c:176
176                 ADD_OP_VAR_PART(interp, sub->seg, pc, var_args);
(gdb) bt
#0  0x6f3a501f in Parrot_sub_context_get_info (interp=0x80039c38,
    ctx=0x801b36f4, info=0x28a9a8) at src/sub.c:176
#1  0x6f3a5463 in Parrot_sub_Context_infostr (interp=0x80039c38,
    ctx=0x801b36f4, is_top=1) at src/sub.c:295
#2  0x6f34ad04 in PDB_get_continuation_backtrace (interp=0x80039c38,
    ctx=0x801b36f4) at src/debug.c:3663
#3  0x6f34aaf0 in Parrot_dbg_get_exception_backtrace (interp=0x80039c38,
    exception=0x801b376c) at src/debug.c:3584
#4  0x6f354d64 in Parrot_ex_build_complete_backtrace_string (
    interp=0x80039c38, ex=0x801b376c) at src/exceptions.c:702
#5  0x6f34d223 in Parrot_api_get_exception_backtrace (interp_pmc=0x800e9468,
    exception=0x801b376c, bt=0x28abf8) at src/embed/api.c:101
#6  0x0040141d in show_last_error_and_exit (interp=0x800e9468) at nqp.c:47144
#7  0x0040136f in main (argc=1, argv=0x28ac70) at nqp.c:47122

Looking into the definition of ADD_OP_VAR_PART() which in turn invokes VTABLE_elements(), the cause of the segfault is apparently

(gdb) print sub->seg->const_table->pmc.constants[(pc)[1]]
$2 = (PMC *) 0x6
(gdb) print sub->seg->const_table->pmc.constants[(pc)[1]]->vtable
Cannot access memory at address 0xa

ie the constants table is borked.

@moritz
Copy link
Contributor

moritz commented Feb 13, 2013

Can you please try it again on newest NQP, and this time cleaning out nqp with git clean -Xdf before reconfiguring? I had similar problems, and they went way after that.

@gerdr
Copy link
Contributor Author

gerdr commented Feb 13, 2013

The build works again. No idea if the problem is actually fixed or just hidden, but I'll close the issue for now.

At best, it was build system related or interference from an installed Parrot (if so, I'll have to blame myself for not nuking the installed libparrot.dll.a - can't be 100% certain that I did). If the cause is a GC bug or memory corruption, we'll see if it crops up again.

@gerdr gerdr closed this as completed Feb 13, 2013
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

2 participants