links2 na amd64
Pawel Sikora
pluto w agmk.net
Wto, 10 Maj 2005, 00:38:29 CEST
On Tuesday 19 of April 2005 12:15, Marcin Doliński wrote:
> On Tuesday 19 of April 2005 11:21, Tomasz Mateja wrote:
> > --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> > +++ killed by SIGSEGV +++
> >
> > Czyste AC.
>
> Prawda.
>
> stat("/home/users/averne/.links2", {st_mode=S_IFDIR|0700, st_size=6, ...})
> = 0 chmod("/home/users/averne/.links2", 0700) = 0
> pipe([5, 6]) = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
tak na szybko, po zmianie...
--- main.c.orig 2005-05-09 22:32:33.335741192 +0000
+++ main.c 2005-05-09 22:28:22.980800928 +0000
@@ -274,7 +274,8 @@
retval = RET_SYNTAX;
goto ttt;
}
- if (strncmp (basename(path_to_exe), "glinks", 6) == 0) ggr = 1;
+ char* bn = basename(path_to_exe);
+ if (strncmp (bn, "glinks", 6) == 0) ggr = 1;
if (ggr_drv[0] || ggr_mode[0]) ggr = 1;
if (dmp) ggr = 0;
if (!ggr && !no_connect && (uh = bind_to_af_unix()) != -1) {
to widac, ze `man 3 basename` z path_to_exe ==
(gdb) p path_to_exe
$1 = (unsigned char *) 0x7fbffff860
"/home/users/builder2/rpm/BUILD/links-2.1pre17/links"
zwraca jakis kosmos...
(gdb) p bn
$5 = (unsigned char *) 0xffffffffbffff88e
<Address 0xffffffffbffff88e out of bounds>
pewnie gdzies po drodze jest jakis sign-extend,
albo cos innego, co nie przewidzialo 64-bitowego
wskaznika. tak strzelam, bo nie mam checi sie
teraz w to zaglebiac. over...
--
The only thing necessary for the triumph of evil
is for good men to do nothing.
- Edmund Burke
Więcej informacji o liście dyskusyjnej pld-devel-pl