On Sa, 08 Mai 2021, Dominique Pellé wrote:
> Christian Brabandt <
cbl...@256bit.org> wrote:
>
> > On Sa, 08 Mai 2021, Christian Brabandt wrote:
> >
> > > Program received signal SIGSEGV, Segmentation fault.
> > > 0x000055555581acf5 in exec_instructions (ectx=0x7fffffff2da0) at vim9execute.c:1367
> > > 1367 switch (iptr->isn_type)
> >
> > Hm, the log does not show, iptr is null.
> >
> > BTW: I also compiled an asan version, but even so I did export
> > ASAN_OPTIONS="print_stacktrace=1 log_path=asan.log", I did not get an
> > asan report :/
>
> According to
https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
> The various options should be separated by a colon, not a space.
Ah, the comment in the Makefile is wrong then. Well, it is not helpful:
=================================================================
==150796==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 367872 byte(s) in 102 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a843aa49 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x174a49)
Direct leak of 23728 byte(s) in 26 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a839b4ad in _PyObject_GC_Malloc (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xd54ad)
Direct leak of 2064 byte(s) in 32 object(s) allocated from:
#0 0x7fd2a9c021f8 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xaa1f8)
#1 0x7fd2a844f006 in PyList_Append (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x189006)
Direct leak of 2002 byte(s) in 3 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a842f413 in PyString_FromStringAndSize (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x169413)
Direct leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a845025f in PyList_New (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x18a25f)
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a845025f in PyList_New (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x18a25f)
#2 0x7ffca24f910f ([stack]+0x2510f)
Indirect leak of 10384 byte(s) in 11 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a839b4ad in _PyObject_GC_Malloc (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xd54ad)
Indirect leak of 4089 byte(s) in 6 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a842f298 in PyString_FromString (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x169298)
Indirect leak of 2090 byte(s) in 3 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a8421fab (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15bfab)
Indirect leak of 1346 byte(s) in 2 object(s) allocated from:
#0 0x7fd2a9c01e8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
#1 0x7fd2a842f413 in PyString_FromStringAndSize (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x169413)
SUMMARY: AddressSanitizer: 413615 byte(s) leaked in 187 allocation(s).
I suppose those are not relevant.
But ./vim 2>asan.log at least shows this:
vim9execute.c:1367:14: runtime error: member access within null pointer of type 'struct isn_T'
> Try putting also full path such as log_path=/tmp/asan.log
> otherwise if vim changes the current directory, it may be hard
> to know where asan.log is. Or run ./vim 2> log asan.log.
>
> Consider also trying with valgrind.
Ah yes, forgot about it. Attached.
(I should probably compile without python).
Best,
Christian
--
Man kann seiner eigenen Zeit nicht böse sein, ohne selbst Schaden zu
nehmen.
-- Robert Musil