Coder Social home page Coder Social logo

Abort error about skipfish HOT 18 CLOSED

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Abort error

from skipfish.

Comments (18)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Does it reproduce reliably? Can you try with 'make clean debug' and redirect
2>logfile.txt, and see if it happens again? Also, regardless of the outcome, 
please
then try "grep ALLOC logfile.txt".

Original comment by [email protected] on 24 Mar 2010 at 5:08

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Yes it is happens all the time.

njh@packard:~/Download/skipfish$ fgrep ALLOC logfile.txt 
njh@packard:~/Download/skipfish$ ls -l logfile.txt 
-rw-r--r-- 1 njh njh 0 Mar 24 17:21 logfile.txt
njh@packard:~/Download/skipfish$ 

Original comment by fumeoftheday on 24 Mar 2010 at 5:23

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
The logfile has a size of 0, which suggests it's not generated for a 'make clean
debug' build? Can you verify?

Original comment by [email protected] on 24 Mar 2010 at 6:25

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Oh wait, this happens during load_keywords(), never mind. Can you provide me 
with a 
gdb backtrace for the 'make clean debug' target, though?

Cheers,
/mz

Original comment by [email protected] on 24 Mar 2010 at 6:48

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Specifically, I would be interesting with the output of these commands in gdb 
against 
a *debug* build:

back
p extension_cnt

Unfortunately, I can't reproduce this locally, so I am also wondering what OS / 
distro you happen to be using?

Original comment by [email protected] on 24 Mar 2010 at 6:55

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
(gdb) back
#0  0x00007f9abc51bf45 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f9abc51ed80 in *__GI_abort () at abort.c:88
#2  0x00007f9abc55154d in __libc_message (do_abort=2, 
    fmt=0x7fff0e3513c0 ' ' <repeats 23 times>, "[stack]\n7fff0e3ff000-7fff0e400000
r-xp 00000000 00:00 0", ' ' <repeats 26 times>,
"[vdso]\nffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0", ' ' <repeats 
18
times>, "[vsyscall]\n:06 4"...) at ../sysdeps/unix/sysv/linux/libc_fatal.c:173
#3  0x00007f9abc55ad16 in malloc_printerr (action=3, 
    str=0x7f9abc602baf "realloc(): invalid pointer", ptr=<value optimized out>)
    at malloc.c:6239
#4  0x00007f9abc5610c5 in realloc_check (oldmem=0x172a480, bytes=16, 
    caller=<value optimized out>) at hooks.c:330
#5  0x0000000000412700 in __DFL_ck_realloc (orig=0x172a480, size=5065, 
    func=0x432210 "wordlist_confirm_single", line=841, 
    file=<value optimized out>) at alloc-inl.h:91
#6  __AD_ck_realloc (orig=0x172a480, size=5065, 
    func=0x432210 "wordlist_confirm_single", line=841, 
    file=<value optimized out>) at alloc-inl.h:258
#7  0x00000000004134f1 in wordlist_confirm_single (text=0x7fff0e351c90 "asmx", 
    is_ext=<value optimized out>, add_hits=<value optimized out>, total_age=2, 
    last_age=<value optimized out>) at database.c:841
#8  0x000000000041370a in load_keywords (fname=<value optimized out>, 
---Type <return> to continue, or q <return> to quit---
    purge_age=0) at database.c:976
#9  0x0000000000403939 in main (argc=6, argv=0x7fff0e351eb8) at skipfish.c:398
(gdb) p extension_cnt
$1 = 1
(gdb)

This is on Debian 5. The output of 'uname -a' is:

Linux packard 2.6.32-3-amd64 #1 SMP Wed Feb 24 18:07:42 UTC 2010 x86_64 
GNU/Linux



Original comment by fumeoftheday on 25 Mar 2010 at 9:08

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
This crash doesn't really make much sense to me. It's essentially crashing 
immediately upon start when reading the second line in the supplied dictionary. 
Very 
little is happening in the code prior to this point, so it's hard to imagine 
what 
could be wrong; and you are the only person reporting this issue so far, 
despite 50k+ 
downloads.

I will keep this bug open, but not being able to reproduce or figure out where 
that 
pointer came from means I might have to close it if no other reports surface.

Original comment by [email protected] on 25 Mar 2010 at 5:41

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Ok. I tracked this down to MALLOC_CHECK_ being apparently set on your system. 
Version 
1.26 should be able to account for this.

Original comment by [email protected] on 26 Mar 2010 at 6:54

  • Changed state: Fixed

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Yes, malloc_check_ IS set to 3 on my system.

Original comment by fumeoftheday on 26 Mar 2010 at 9:08

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
[deleted comment]

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
I just tried it on version 1.26b and I got the same crash.

Original comment by fumeoftheday on 29 Mar 2010 at 11:02

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Please set MALLOC_CHECK_ to 0 manually before executing the tool and let me 
know if 
this helps.

Original comment by [email protected] on 29 Mar 2010 at 4:05

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Still crashes.

I am compiling with -fstack-protector, if that helps.

Original comment by fumeoftheday on 29 Mar 2010 at 4:24

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Huh? Why? Did you modify the Makefile manually? Were any other options added to 
CFLAGS? If yes, can you let me know if you are still seeing problems when you 
remove 
them?

Original comment by [email protected] on 29 Mar 2010 at 5:12

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
It comes in from CFLAGS.

If I disable it I no longer get a crash, so it looks as though you have a buffer
overflow problem somewhere.

Original comment by fumeoftheday on 30 Mar 2010 at 9:05

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Did you have anything else in CFLAGS, or just -fstack-protector?

The crash seems unrelated to the mechanism, which is odd.

Original comment by [email protected] on 30 Mar 2010 at 3:43

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
njh@packard:~$ echo $CFLAGS
-O2 -W -Wformat=2 -Wswitch -Wshadow -Wwrite-strings -Wuninitialized -Wall -pipe
-mtune=core2 -march=core2 -fomit-frame-pointer -ffast-math -msse2 -msse -mmmx
-mfpmath=sse -pedantic -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wstrict-prototypes
-fstack-protector -Wstack-protector -Wextra -Wbad-function-cast -Wcast-align
-Wcast-qual -Wdisabled-optimization -Wendif-labels -Wfloat-equal 
-Wformat-nonliteral
-Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wpointer-arith
-Wundef -Wformat-security

Original comment by fumeoftheday on 30 Mar 2010 at 3:45

from skipfish.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
OK, I believe your problem is -D_FORTIFY_SOURCE=2. It's a bug in FORTIFY_SOURCE 
in
GCC, not in skipfish.

It would have helped troubleshoot this problem if you described these 
non-standard
tweaks to your system (MALLOC_CHECK, FORTIFY_SOURCE, -fstack-protector, etc) up 
front.

I will have a tweak in 1.27 to reorder CFLAGS to always force FORTIFY_SOURCE 
off.

/mz

Original comment by [email protected] on 30 Mar 2010 at 3:55

from skipfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.