Plain "./fio" segfaults on FreeBSD
The latest code from git (built using clang) causes a segfault after printing the usage text when "./fio" is run:
[New LWP 100111]
No jobs(s) defined
fio-2.2.5-28-g93eeb
[usage text]
[New Thread 801c06400 (LWP 100111/fio)]
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 801c06400 (LWP 100111/fio)] flist_empty (head=0x802000040) at flist.h:119
119 return head->next == head;
Current language: auto; currently minimal (gdb) p head
$1 = (const struct flist_head *) 0x802000040
Also, could we update -std=gnu99 to -std=c11 and use _Static_assert in compiler.h? Currently, turning optimizations off in the Makefile causes linker failures such as "fio/libfio.c:308: undefined reference to `__compiletime_assert_308'".
Signature · 1 line
Bruce
Quoted 10 lines · Bruce Cran
The latest code from git (built using clang) causes a segfault after printing the usage text when "./fio" is run:
[New LWP 100111]
No jobs(s) definedfio-2.2.5-28-g93eeb
[usage text]
[New Thread801c06400(LWP 100111/fio)]
Quoted 7 lines
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread
801c06400(LWP 100111/fio)]flist_empty(head=0x802000040) at flist.h:119
119 returnhead->next== head;
Current language: auto; currently minimal (gdb) p head
$1 = (const structflist_head*)0x802000040
I can reproduce this, very strange... I'll debug it.
Quoted 4 lines
Also, could we update -std=gnu99 to -std=c11 and use
_Static_assertincompiler.h? Currently, turning optimizations off in theMakefilecauses linker failures such as "fio/libfio.c:308: undefined reference to `__compiletime_assert_308'".
I think it'd be more bullet proof (considering other platforms) to just not do the compile time asserts at all if optimizations aren't enabled. I'd be happy to take a patch for that...
Signature · 1 line
Jens Axboe
Quoted 19 lines · Jens Axboe
Quoted 10 lines · Bruce Cran
The latest code from git (built using clang) causes a segfault after printing the usage text when "./fio" is run:
[New LWP 100111]
No jobs(s) definedfio-2.2.5-28-g93eeb
[usage text]
[New Thread801c06400(LWP 100111/fio)]Quoted 7 lines
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread
801c06400(LWP 100111/fio)]flist_empty(head=0x802000040) at flist.h:119
119 returnhead->next== head;
Current language: auto; currently minimal (gdb) p head
$1 = (const structflist_head*)0x802000040
Quoted 1 line
I can reproduce this, very strange... I'll debug it.
This should fix it:
http://git.kernel.dk/?p=fio.git;a=commit;h=3d0e3417997d9caa27cf97462e15ba437d285d29
Signature · 1 line
Jens Axboe