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

[BUG t/lib/English.t 5.005_63] Segfault, probably due to tying. #1064

Closed
p5pRT opened this issue Jan 21, 2000 · 2 comments
Closed

[BUG t/lib/English.t 5.005_63] Segfault, probably due to tying. #1064

p5pRT opened this issue Jan 21, 2000 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 21, 2000

Migrated from rt.perl.org#2016 (status was 'resolved')

Searchable as RT2016$

@p5pRT
Copy link
Author

p5pRT commented Jan 21, 2000

From @schwern

English.pm

@p5pRT
Copy link
Author

p5pRT commented Jan 21, 2000

From @gsar

On Fri, 21 Jan 2000 13​:06​:47 EST, Michael G Schwern wrote​:

The segfault occurs on line 26​:

   print $PREMATCH\, $MATCH\, $POSTMATCH;

$PREMATCH, $MATCH and $POSTMATCH at this point are all variables tied
into English​::Evil so I presume this is a tying problem and the stack
trace seems to confirm that.

Here is a stack trace from the point of the segfault.

#0 0x400e8c25 in memmove () from /lib/libc.so.6
#1 0x80c18de in Perl_sv_setpvn (sv=0x813f420,
ptr=0x5 <Address 0x5 out of bounds>, len=5) at sv.c​:2720
  ^^^

It would seem PL_curpm->op_pmregexp->subbeg is invalid at this point, but
the code passes it to sv_setpvn() without checking.

#2 0x80a7d2f in Perl_magic_get (sv=0x813f420, mg=0x8193308) at mg.c​:547
#3 0x80a703b in Perl_mg_get (sv=0x813f420) at mg.c​:96
#4 0x80c084c in Perl_sv_setsv (dstr=0x813f42c, sstr=0x813f420) at sv.c​:2452
#5 0x80c598d in Perl_sv_mortalcopy (oldstr=0x813f420) at sv.c​:4216
#6 0x80e6e5e in Perl_pp_return () at pp_ctl.c​:1819
#7 0x80b223d in Perl_runops_debug () at run.c​:56

Sarathy
gsar@​ActiveState.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant