[vlc-devel] memory breakage at vlc_stat

Rémi Denis-Courmont remi at remlab.net
Sat Jan 28 13:32:01 CET 2012


Le samedi 28 janvier 2012 14:26:13 Naohiro KORIYAMA, vous avez écrit :
> 2012/1/28 Rémi Denis-Courmont <remi at remlab.net>:
> > Le samedi 28 janvier 2012 12:01:41 Naohiro KORIYAMA, vous avez écrit :
> >> VLC win32 nightly builds (vlc-2.1.0-git-20120128-0411-win32-debug) does
> >> not run.
> >> 
> >> int vlc_stat (const char *filename, struct stat *buf)
> >>  int ret = _wstati64 (wpath, buf);
> >> 
> >> compiler warning appears here because of incompatible pointer type:
> >> ../../extras/package/win32/../../../src/win32/filesystem.c: In
> >> function 'vlc_stat':
> >> ../../extras/package/win32/../../../src/win32/filesystem.c:246:
> >> warning: passing argument 2 of '_wstati64' from incompatible pointer
> >> type
> >> /usr/lib/gcc/i586-mingw32msvc/4.4.4/../../../../i586-mingw32msvc/include
> >> /sy s/stat.h:182: note: expected 'struct _stati64 *' but argument is of
> >> type 'struct stat *'
> >> 
> >> This cause memory breakage.
> >> After passing _wstati64(), filename is broken. I confirmed it with gdb.
> > 
> > It works fine here in fact.
> 
> I'm sorry, at that time, filename was broken on my build, but filename
> is not broken on NB.
> But another part (relpath, absdir) is broken on NB.

Lots of things are optimized out in that stack trace. I am afraid I do not 
have the time to guess what is going to wrong. Turning optimizations off might 
help.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list