From: Peter Jay Salzman <p@dirac.org>
To: linux-msdos@vger.kernel.org
Subject: segfault with backtrace and information
Date: Sun, 8 Dec 2002 12:30:22 -0800 [thread overview]
Message-ID: <20021208203022.GA5036@dirac.org> (raw)
dosemu consistantly segfaults on one of my machines.
i'm using version 1.1.3.7 with the experimental sound patches under
vanilla 2.4.20. machine arch is AMD athlon 1st generation 1.4 GHz with
a 1st generation ATI radeon.
the machine didn't oops.
backtrace is follows:
lucifer# gdb /usr/local/bin/dos-debug
(gdb) run
Starting program: /usr/local/bin/dos-debug
Linux kernel 2.4.19; CPU speed is 1300264000 Hz
Dosemu-1.1.3.7 Running on CPU=586, FPU=1
Program received signal SIGSEGV, Segmentation fault.
0x080aeda4 in real_yylex (yylval=0x4d003b) at lexer.l:707
707 yylval->s_value = strdup(&yytext[1]);
(gdb) bt
#0 0x080aeda4 in real_yylex (yylval=0x4d003b) at lexer.l:707
#1 0x08107251 in _IO_stdin_used ()
the area of code:
(gdb) l 707
702 {STRQUOTELESS} MAY_BEFORME {
703 yylval->s_value = strdup(yytext);
704 EXPRTYPE(yylval->s_value) = TYPE_STRQUOTELESS;
705 return(STRING); }
706 ${IDENT} MAY_BE {
707 yylval->s_value = strdup(&yytext[1]);
708 EXPRTYPE(yylval->s_value) =
TYPE_STRQUOTELESS;
709 return(VARIABLE);
710 }
711 $${IDENT} MAY_BE { enter_macrofile(&yytext[2]);}
(gdb) printf "%s", &yytext[1]
_DOSEMU_ORIG_PATH(gdb)
(gdb) printf "%s", strdup(&yytext[1])
_DOSEMU_ORIG_PATH(gdb)
(gdb) printf "%s", yylval->s_value
Cannot access memory at address 0x4d003b
(gdb) printf "%s", yylval->s_value
Cannot access memory at address 0x4d003b
(gdb) ptype yylval->s_value
type = char *
(gdb) p yylval->s_value = strdup(&yytext[1])
Cannot access memory at address 0x4d003b
i'm a bit confused at this point. it looks like the address returned by
strdup is no good, but i have no idea how that can be.
strace provides no help:
write(2, "Linux kernel 2.4.19; CPU speed i"..., 48) = 48
write(2, "Dosemu-1.1.3.7 Running on CPU=58"..., 41) = 41
brk(0x832d000) = 0x832d000
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
ltrace output pretty much confirms what the backtrace said:
strcmp("parser_version_3", "h_lucifer") = 8
strcmp("parser_version_3", "c_all") = 13
strcmp("parser_version_3", "parser_version_3") = 0
strchr(""/etc/dosemu.conf"", '\n') = NULL
__strdup(0x08329490, 10, 0, 0x080aa782, 0x08107251) = 0x0832cb78
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
dosemu works fine on my other machines. this seems to be a problem with
this machine only, but nothing about this looks arch dependent to me.
any suggestions?
pete
--
Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
next reply other threads:[~2002-12-08 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-08 20:30 Peter Jay Salzman [this message]
2002-12-08 20:31 ` segfault with backtrace and information Peter Jay Salzman
2002-12-14 13:23 ` Emmanuel Jeandel
-- strict thread matches above, loose matches on Subject: below --
2002-12-09 17:34 Stas Sergeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021208203022.GA5036@dirac.org \
--to=p@dirac.org \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.