Ticket #1940 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

set_pmc segfaults in BigInt

Reported by: rfw Owned by:
Priority: major Milestone:
Component: none Version: 2.11.0
Severity: high Keywords:
Cc: Language:
Patch status: Platform:


Calling the set_pmc vtable method in BigInt causes a segfault.

Here is the backtrace:

#0  0xb78bda71 in __gmpn_copyi () from /usr/lib/libgmp.so.10
#1  0xb788b663 in __gmpz_set () from /usr/lib/libgmp.so.10
#2  0xb7d0c0af in bigint_set_self (interp=0x8058020, self=0x810ffb8, value=0x8058568) at ./src/pmc/bigint.pmc:541
#3  0xb7d12608 in Parrot_BigInt_set_pmc (interp=0x8058020, _self=0x810ffb8, value=0x810fcd4) at ./src/pmc/bigint.pmc:1337
#4  0xb7cc1d1e in Parrot_default_assign_pmc (interp=0x8058020, _self=0x810ffb8, value=0x810fcd4) at ./src/pmc/default.pmc:705
#5  0xb7b85f41 in Parrot_assign_p_p (cur_opcode=0x815bbf0, interp=0x8058020) at src/ops/core_ops.c:21583
#6  0xb7c7f720 in runops_slow_core (interp=0x8058020, runcore_unused=0x80d8188, pc=0x815bbf0) at src/runcore/cores.c:646
#7  0xb7c7da36 in runops_int (interp=0x8058020, offset=0) at src/runcore/main.c:218
#8  0xb7c15bf9 in runops (interp=0x8058020, offs=0) at src/call/ops.c:126
#9  0xb7c09899 in Parrot_pcc_invoke_from_sig_object (interp=0x8058020, sub_obj=0x80db9f8, call_object=0x8125718) at src/call/pcc.c:323
#10 0xb7c08aae in Parrot_pcc_invoke_sub_from_c_args (interp=0x8058020, sub_obj=0x80db9f8, sig=0xb7e8b0dc "P->") at src/call/pcc.c:130
#11 0xb7bcb3f8 in Parrot_api_run_bytecode (interp_pmc=0x80d6060, pbc=0x81256f0, mainargs=0x8125704) at src/embed/api.c:459
#12 0x080497a8 in main (argc=2, argv=0xbffff684) at frontend/parrot/main.c:180


segfaulty.pir Download (118 bytes) - added by rfw 11 years ago.
Code that causes the segfault.

Change History

Changed 11 years ago by rfw

Code that causes the segfault.

Changed 11 years ago by nwellnhof

  • status changed from new to closed
  • resolution set to fixed

Fixed in 4bcb796. Test enabled in c9ea3e3.

Note: See TracTickets for help on using tickets.