help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Fun/Crashes with newer GCC on Debian


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Fun/Crashes with newer GCC on Debian
Date: Sat, 12 Oct 2013 18:53:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 11/10/2013 08:25, Holger Hans Peter Freyther ha scritto:
> On Fri, Oct 11, 2013 at 08:08:57AM +0200, Holger Hans Peter Freyther wrote:
>> Hi,
>>
>> I looked into Paolo's patches and ran make check to see a crash in
>> the pools.st. But it turns out it is crashing due me upgrading to
>> GCC 4.8/Binutils 2.23.52.20130828-1  (something in the layout
>> of the text changed and I see a new class of bugs).
> 
> and I forgot the issue I have difficulties to understand.
> 
> compiler.st is reporting an asan error. So in frame 3 the
> "startPos - in_stream->fileOffset" will be -6 and p - 6
> will not point to the right place. Any idea?

It's a lookahead problem, here is a reduced testcase

st> Object extend [ x [ ^thisContext parentContext method methodSourceString ] ]
st> '''abc'' printNl ''def'' x printNl' readStream fileIn
'abc'
'x printN'
a ReadStream

Paolo

> 
> holger
> 
> 
> Breakpoint 1, 0xb69ea850 in __asan_report_error () from 
> /usr/lib/i386-linux-gnu/libasan.so.0
> (gdb) frame 2
> #2  0xb6848e81 in _gst_counted_string_new (address@hidden "", address@hidden)
>     at dict.c:1976
> 1976      memcpy (string->chars, s, len);
> (gdb) frame 1
> #1  0xb69e38cf in __asan_report_load1 () from 
> /usr/lib/i386-linux-gnu/libasan.so.0
> (gdb) frame 2
> #2  0xb6848e81 in _gst_counted_string_new (address@hidden "", address@hidden)
>     at dict.c:1976
> 1976      memcpy (string->chars, s, len);
> (gdb) frame 3
> #3  0xb689c04c in _gst_get_source_string (startPos=14, endPos=26) at 
> input.c:548
> 548       result = _gst_counted_string_new (p + (startPos - 
> in_stream->fileOffset),
> (gdb) p *in_stream
> $1 = {type = STREAM_OOP, pushedBackChars = " \000", pushedBackCount = 0, line 
> = 1, 
>   column = 29, prompt = 0x0, fileOOP = 0x4042b800, 
>   fileName = 0xb697e600 "a Smalltalk Stream", fileOffset = 20, st = 
> {u_st_file = {
>       fd = 1078402496, buf = 0xb5c0efe0 "printNl", ptr = 0xb5c0efe7 "", end = 
> 0xb5c0efe7 ""}, 
>     u_st_str = {strBase = 0x40471dc0 "0鮴", str = 0xb5c0efe0 "printNl"}, 
> u_st_oop = {
>       oop = 0x40471dc0, buf = 0xb5c0efe0 "printNl", ptr = 0xb5c0efe7 "", 
>       end = 0xb5c0efe7 ""}}, prevStream = 0xb5601760}
> (gdb) p in_stream->fileOffset
> $2 = 20
> (gdb) p startPos
> $3 = 14
> (gdb) p p
> $4 = 0xb5c0efe0 "printNl"
> (gdb) q
> 
> 
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-smalltalk
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]