#1230: src/pmc/eval.pmc: Walk the fixups, locate globals and nullify the Sub
PMC
---------------------+------------------------------------------------------
Reporter: jkeenan | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: 1.7.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
---------------------+------------------------------------------------------
This ticket moves into the Trac system an issue previously discussed in
the RT system as [http://rt.perl.org/rt3/Ticket/Display.html?id=46683 RT
#46683].
{{{
139 =item C<opcode_t *invoke(void *next)>
140
141 Invokes the first subroutine in the eval code.
142
143 =cut
144
145 */
146
147 VTABLE opcode_t *invoke(void *next) {
148 PMC *sub = SELF.get_pmc_keyed_int(0);
149 return VTABLE_invoke(INTERP, sub, next);
150 }
151
152 VTABLE void destroy() {
153 /*
154 * If the compiled code contained any .sub (or .pcc.sub)
155 * subroutines, these subs got installed in the globals
156 * during compiling this bytecode segment.
157 *
158 * These globals still exist, calling them will segfault
159 * as the segment is destroyed now.
160 *
161 * RT#46683 walk the fixups for this segment, locate globals
162 * and nullify the Sub PMC.
163 * This probably needs a pointer into the globals.
164 *
165 * OTOH - if the global exists - this eval pmc ought
166 * to be alive and destroy isn't called.
167 */
168 PackFile_Segment *seg;
169 PackFile_ByteCode *cur_cs;
170 Parrot_Sub_attributes *sub_data;
171
...
}}}
kid51
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1230>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets