#52 closed defect (fixed)
unable to reproduce divcc/gzip hello world with divine-4.2.1+2019.02.06
Reported by: | Kamil Dudka | Owned by: | mornfall |
---|---|---|---|
Priority: | major | Milestone: | 4.3 |
Component: | VM | Keywords: | |
Cc: |
Description
I tried to reproduce https://divine.fi.muni.cz/2018/dios/#building-gzip with the latest nightly snapshot of Divine but it does not seem to work any more.
Steps to reproduce:
- download https://divine.fi.muni.cz/download/snapshots/divine-4.2.1+2019.02.06.tar.gz
- build it using the instructions at https://divine.fi.muni.cz/manual.html#installation
- run
ninja divcc
in the build directory (as divcc was not built by default) - follow the instructions at https://divine.fi.muni.cz/2018/dios/#building-gzip
Actual result:
loading bitcode … LART … RR … constants … done booting … done states per second: 1000 state count: 28 mips: 1.4 error found: yes error trace: | (0) Non-zero exit code: 1 (0) FAULT: exit called with non-zero value [0] FATAL: unknown in userspace FAULT: invalid pointer passed to __vm_obj_free FATAL: fault handler called recursively active stack: - symbol: void __dios::FaultBase::handler<__dios::Upcall<__dios::fs::VFS<__dios::ProcessManager<__dios::Fault<__dios::Scheduler<__dios::config::Base> > > > > >(_VM_Fault, _VM_Frame*, void (*)()) location: /dios/include/dios/sys/fault.hpp:87 - symbol: __dios_fault location: /dios/src/libc/sys/fault.c:14 - symbol: _exit location: /dios/src/libc/sys/start.cpp:76 - symbol: _PDCLIB_Exit location: /dios/src/libc/_PDCLIB/_PDCLIB_Exit.c:20 - symbol: _Exit location: /dios/src/libc/stdlib/_Exit.c:18 - symbol: exit location: /dios/src/libc/stdlib/exit.c:53 - symbol: do_exit location: gzip.c:2102 - symbol: abort_gzip location: gzip.c:2140 - symbol: gzip_error location: util.c:429 - symbol: unzip location: unzip.c:137 a report was written to gzip.report
Note that ./gzip -f -d - < hello.gz
, as well as gzip -f -d - < hello.gz
, return zero exit code when invoked off Divine.
Change History (3)
comment:1 Changed 6 years ago by
Component: | divcc → VM |
---|---|
Milestone: | 5.0 → 4.3 |
Owner: | changed from blurrymoi to mornfall |
comment:2 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have checked in the fix. Also turns out that LLVM codegen can't deal (on x86_64 at least) with vaarg of 'long double'. On debug builds, it triggers an assertion, on release builds, it silently generates bad code. I have added a workaround that makes the generated code fail at runtime (meaning the gzip test should pass now also with assertions enabled).
comment:3 Changed 6 years ago by
I can confirm that the problem does not occur with https://divine.fi.muni.cz/download/snapshots/divine-4.2.1+2019.02.10.tar.gz Thanks for the quick fix!
Turns out that gzip works OK when compiled with -O0 (i.e. ./configure CC=divcc CFLAGS=-O0). I have tracked down the problem to the VM mishandling a 'switch' instruction on a 2-bit integer that the optimizer now emits. I won't have time to fix this tomorrow, but next week should be quite doable. For now, I have added the recipe as an automated testcase so that we do not regress on this in the future.
PS: gzip-1.8-divine.diff is no longer required with recent versions of divine