develooper Front page | perl.perl5.porters | Postings from December 2012

Re: perl smokes with -DPERL_GLOBAL_STRUCT (or-DPERL_GLOBAL_STRUCT_PRIVATE)?

Thread Previous | Thread Next
From:
George Greer
Date:
December 4, 2012 03:23
Subject:
Re: perl smokes with -DPERL_GLOBAL_STRUCT (or-DPERL_GLOBAL_STRUCT_PRIVATE)?
Message ID:
alpine.LFD.2.02.1212032215000.12588@ein.m-l.org
On Mon, 3 Dec 2012, Nicholas Clark wrote:

> IIRC I tried -DPERL_GLOBAL_STRUCT_PRIVATE a while back (for some unrelated
> reason) and hit a problem that I couldn't work out how to solve.
>
> I've trust tried building on x86_64 Linux, and I can't get beyond miniperl,
> due to a SEGV.
>
> A rather simple demonstration of the problem:
>
> $ valgrind ./miniperl -e0
> ==20724== Memcheck, a memory error detector
> ==20724== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
> ==20724== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
> ==20724== Command: ./miniperl -e0
> ==20724==
> ==20724== Conditional jump or move depends on uninitialised value(s)
> ==20724==    at 0x405394: S_init_tls_and_interp (perl.c:99)
> ==20724==    by 0x4057A3: perl_alloc (perl.c:209)
> ==20724==    by 0x435358: main (miniperlmain.c:104)
> ==20724==
> ==20724== Invalid read of size 4
> ==20724==    at 0x405691: Perl_sys_term (perl.c:154)
> ==20724==    by 0x435490: main (miniperlmain.c:145)
> ==20724==  Address 0x5e81254 is 532 bytes inside a block of size 632 free'd
> ==20724==    at 0x4C2475F: free (vg_replace_malloc.c:427)
> ==20724==    by 0x4BEE45: Perl_free_global_struct (util.c:5762)
> ==20724==    by 0x43548B: main (miniperlmain.c:142)

Curiously, I also build on x86_64 and -DPERL_GLOBAL_STRUCT_PRIVATE works 
except for the porting test that says it is trying to export two variables 
that don't exist.

My valgrind doesn't have the conditional jump failure of yours but it 
does have some invalid read/writes that don't appear to otherwise 
interfere with execution.

v5.17.6-143-g424fc9e

-- 
George Greer

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About