Ticket #2123 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

t/src/extend_vtable.t: Null PMC access in destroy

Reported by: benabik Owned by: dukeleto
Priority: normal Milestone:
Component: testing Version: master
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: darwin

Description

On OS X 10.6.7 using gcc-4.2.1, I get the following errors in t/src/extend_vtable.t:

#   Failed test 'Parrot_PMC_get_pmc_keyed'
#   at t/src/extend_vtable.t line 248.
#          got: 'Failed!
# Exception is: type 5 severity 2 message 'Null PMC access in destroy()'
# '
#     expected: 'Done!
# '
# './t/src/extend_vtable_5' failed with exit code 0

#   Failed test 'Parrot_PMC_get_pmc_keyed_int'
#   at t/src/extend_vtable.t line 263.
#          got: 'Failed!
# Exception is: type 5 severity 2 message 'Null PMC access in destroy()'
# '
#     expected: 'Done!
# '
# './t/src/extend_vtable_7' failed with exit code 0

#   Failed test 'Parrot_PMC_find_method'
#   at t/src/extend_vtable.t line 324.
#          got: '42
# Failed!
# Exception is: type 5 severity 2 message 'Null PMC access in destroy()'
# '
#     expected: '42
# Done!
# '
# './t/src/extend_vtable_15' failed with exit code 0

#   Failed test 'Parrot_PMC_get_pmc_keyed_str'
#   at t/src/extend_vtable.t line 442.
#          got: 'Failed!
# Exception is: type 5 severity 2 message 'Null PMC access in destroy()'
# '
#     expected: 'Done!
# '
# './t/src/extend_vtable_28' failed with exit code 0
# Looks like you failed 4 tests of 113.

Change History

Changed 11 years ago by dukeleto

I fixed master, but this code is still present in the leto/embed_grant branch. Whiteknight seems to think that Parrot_PMC_destroy is broken by design, which it probably is, but I am probably doing something incorrect in my tests, to boot. All of these tests pass for me on Ubuntu 10.10 with g++ 4.4.5 but fail for Benabik who is on OS X 10.6.7 and gcc 4.2.

I think the way that I am checking for PMCNULL may not be correct. I had reimplement how Parrot core does it, because the PMC_IS_NULL macro is not correctly exported. The macro symbol is, but it calls a function Parrot_is_null that is not exported and my compile fails when attempting to use it.

Any help or suggestions are much appreciated.

Changed 11 years ago by whiteknight

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

I just removed Parrot_PMC_destroy from master. The function is a land-mind. VTABLE_destroy should only ever be called internally to GC, and only on certain PMCs which have the destroy flag set on the PMC header. Calling VTABLE_destroy, or anything that calls VTABLE_destroy, would have had an extreme destabilizing effect on your program. There's no reason for it to be made available through the extend API.

Because this function is gone, I'm closing this ticket.

Note: See TracTickets for help on using tickets.