[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

Charles-François Natali report at bugs.python.org
Tue Aug 30 09:05:25 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> I think that the problem is that fdopendir() is not defined. If a function is not defined, C uses int as the result type. An int is not enough to store a 64-bit pointer. See in gdb output: dirp is 0x0afb0e80 whereas other pointers look like 0x20973fc30. You missed the highest hexa digit (0x2).

Yeah, I noticed that. I didn't make the connection with the
possibility of missing prototype though. Nice catch.

> I tried "AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)" but it doesn't work.
>

You mean that the patch you attached doesn't work, correct?
I know it's a stupid question, but you're sure you didn't forget to
run autoconf/autoheader?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12852>
_______________________________________


More information about the Python-bugs-list mailing list