FS#60340 - [ispc] 1.9.2 crashes on any input

Attached to Project: Community Packages
Opened by Jonas Karlsson (jonask) - Sunday, 07 October 2018, 18:31 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 10 December 2018, 18:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Jirkovsky (6xx)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

ispc 1.9.2 crashes on any input.

Additional info:
Using package ispc 1.9.2-4.

Steps to reproduce:
Just running ispc without any input. Below shows the output:

jonas@x220 ~> ispc
Warning: No output file or header file name specified. Program will
be compiled and warnings/errors will be issued, but no output will be
generated.
Warning: No --target specified on command-line. Using default
system target "avx1-i32x8".
main.cpp(235): FATAL ERROR: Unhandled signal sent to process; terminating.
***
*** Please file a bug report at https://github.com/ispc/ispc/issues
*** (Including as much information as you can about how to reproduce this error).
*** You have apparently encountered a bug in the compiler that we'd like to fix!
***
fish: “ispc” terminated by signal SIGABRT (Abort)
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 10 December 2018, 18:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  ispc 1.9.2-5
Comment by Doug Newgard (Scimmia) - Tuesday, 16 October 2018, 17:31 GMT
I don't see any problem with what you posted. What's the *actual* problem?

Or was it not supposed to abort when it had nothing to do?
Comment by Jonas Karlsson (jonask) - Tuesday, 16 October 2018, 18:16 GMT
It should not abort. The problem is it is completely broken and aborts irregardless of what input you give it. When I run ispc from https://ispc.github.io/downloads.html it works fine. When I run ispc from arch it crashes. You can see the difference between the two calls below:

jonas@x220 ~/D/ispc-v1.9.2-linux> ./ispc mandelbrot.ispc -o out --target avx
jonas@x220 ~/D/ispc-v1.9.2-linux> /usr/bin/ispc mandelbrot.ispc -o out --target avx
main.cpp(235): FATAL ERROR: Unhandled signal sent to process; terminating.
***
*** Please file a bug report at https://github.com/ispc/ispc/issues
*** (Including as much information as you can about how to reproduce this error).
*** You have apparently encountered a bug in the compiler that we'd like to fix!
***
fish: “/usr/bin/ispc mandelbrot.ispc -…” terminated by signal SIGABRT (Abort)
Comment by Bruno Pagani (ArchangeGabriel) - Tuesday, 23 October 2018, 14:23 GMT
This is likely due to LLVM7 being used in Arch. Someone should check if the issue exists with ispc-git, and if not we should try to find what change is required for this. I don’t have time to do so for now, so I would appreciate if you could try that.
Comment by Jonas Karlsson (jonask) - Sunday, 28 October 2018, 17:55 GMT
The issue is still present in ispc-git and it is related to clang 7 since compiling with gcc works. I created an issue at https://github.com/ispc/ispc/issues/1352
Comment by Doug Newgard (Scimmia) - Monday, 29 October 2018, 00:06 GMT
Not sure if it's related, though. This ticket is about an abort, the upstream ticket you filed is a segfault.
Comment by Evangelos Foutras (foutrelis) - Friday, 02 November 2018, 00:42 GMT
@Doug: It appears to be the same issue. The segfault is captured by gdb; if uncaptured, ispc's signal handler turns it into an abort.

The same problem appears to have come up elsewhere: https://groups.google.com/forum/#!msg/llvm-dev/8Tcz49kTNCw/NI0l_MiZAwAJ

For now, I believe it's best to compile ispc with gcc. I don't see an accepted fix for this upstream yet.
Comment by Bruno Pagani (ArchangeGabriel) - Friday, 02 November 2018, 09:04 GMT
Yes, the summary is always the same: “In short, building your project with clang and linking against LLVM libraries built with GCC causes a SEGFAULT because of an ABI incompatibility.”.

I’m rebuilding ispc with gcc for the time being, but I’m wondering if building clang/llvm with clang wouldn’t make much more sense…
Comment by Evangelos Foutras (foutrelis) - Friday, 02 November 2018, 09:06 GMT
> I’m wondering if building clang/llvm with clang wouldn’t make much more sense…

I'd rather not have to rebuild all packages linking to LLVM, and possibly still have the same problem afterwards (but in reverse).
Comment by Bruno Pagani (ArchangeGabriel) - Friday, 02 November 2018, 09:23 GMT
Yeah, I didn’t though about this… I don’t know how many packages we have that depends on LLVM and are built with clang instead of gcc, nor how many are build with gcc..
Comment by Jonas Karlsson (jonask) - Saturday, 10 November 2018, 22:21 GMT
It seems ispc is working again with ispc 1.9.2-5 package. Thanks.

Loading...