Date: Tue, 3 Jul 2007 22:59:22 +0200 From: "Pascal Hofstee" <caelian@gmail.com> To: current <current@freebsd.org> Subject: Re: ZFS vs Samba Debugging Results ... Need Help. Message-ID: <d8a0b7620707031359wc178fdfocf2387820fcacbf5@mail.gmail.com> In-Reply-To: <d8a0b7620707031331w5b0fcae2jd96cb7ff8b3f34d6@mail.gmail.com> References: <d8a0b7620707031331w5b0fcae2jd96cb7ff8b3f34d6@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7/3/07, Pascal Hofstee <caelian@gmail.com> wrote: > I include the function implementation in question for convenience here: > > char *vfs_readdirname(connection_struct *conn, void *p) > { > SMB_STRUCT_DIRENT *ptr= NULL; > char *dname; > > if (!p) > return(NULL); > > ptr = SMB_VFS_READDIR(conn, (DIR *)p); > if (!ptr) > return(NULL); > > dname = ptr->d_name; > > #ifdef NEXT2 > if (telldir(p) < 0) > return(NULL); > #endif > > #ifdef HAVE_BROKEN_READDIR_NAME > /* using /usr/ucb/cc is BAD */ > dname = dname - 2; > #endif > > return(dname); > } I hate following up on my own posts especially several minutes after the original. I just realised that i overlooked one detail in my original debugging session which entirely explains what's happening ... Below is a walk-through of my debugging session: Breakpoint 1, vfs_readdirname (conn=0x20a25030, p=0x20a0e000) at smbd/vfs.c:628 628 if (!p) (gdb) next 631 ptr = SMB_VFS_READDIR(conn, (DIR *)p); (gdb) 632 if (!ptr) (gdb) print ptr $3 = (struct dirent *) 0x20a0e014 (gdb) print dname $4 = 0x20a0e014 "\003" (gdb) next 647 return(dname); It looks like somehow gcc optimized out the actual assignment of dname ! With kind regards, -- Pascal Hofstee
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d8a0b7620707031359wc178fdfocf2387820fcacbf5>