Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
21073 Discussions

DRIVER BUG: Floating Point Exception in glClear, depending on clear color.

Bram_S_
New Contributor I
1,291 Views

System:

Linux ubuntu64 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz

libgl1-mesa-dri:amd64                                11.2.0-1ubuntu2.1

Driver:

GL_VENDOR   Intel Open Source Technology Center
GL_RENDERER Mesa DRI Intel(R) Haswell Desktop
GL_VERSION  3.3 (Core Profile) Mesa 11.2.0
GL_SHADING_LANGUAGE_VERSION 3.30

Steps to reproduce:

#include <fenv.h>
...

feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );

...

glClearColor(0.5,0,0,1);

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Expected results: running program.

Actual results: floating point exception, aborted process.

Thread 1 "game" received signal SIGFPE, Arithmetic exception.


The crash goes away using a different clear color like 1,1,1,1 or 0,0,0,1

Why on earth does the clear color matter?

The driver should not do any bad FP operations. Never divide by zero, not overflow or underflow. Intel QA should test their driver with FP exceptions enabled, so this would get caught.

 

 

0 Kudos
3 Replies
Bram_S_
New Contributor I
1,291 Views

Some additional info:

stacktrace:

(gdb) where
#0  0x00007fffeed83459 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#1  0x00007fffeed6ba41 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#2  0x00007fffeed52818 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#3  0x00007fffeed5ae5b in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007fffeed5baa7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007fffeed42a18 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#6  0x0000000000451ed2 in Gfx::TargetClear (r=0.0100228256, g=0.0100228256, b=0.039681904, a=1, depth=1, stencil=0) at ../graphics/graphics.cpp:559
#7  0x000000000040d578 in Vis::Update (this=0x7ffffffeba90, elapsed=2.33999998e-07, numsteps=1, dt=0.00416666688, wld=0x7ffffffeeef8) at vis.cpp:535
#8  0x000000000042b9ca in main (argc=1, argv=0x7fffffffddb8) at main.cpp:124


(crash is in glClear())

And some HW is affected, others not.

Affected: GL_RENDERER Mesa DRI Intel(R) Haswell Desktop

Not affected: GL_RENDERER Mesa DRI Intel(R) Sandybridge Desktop

0 Kudos
Michael_C_Intel2
Employee
1,291 Views

Hi,

 

Unfortunately I can't help with Linux driver questions/issues. We do have some places you can go for help though.

 

For questions and issues with the Mesa driver, your best options are:

 

For LVDS issues, your best option is to contact one of Intel's kernel graphics developers. You can find them on IRC atirc://irc.freenode.net/#intel-gfx and on the mailing list  http://lists.freedesktop.org/mailman/listinfo/intel-gfx

 

-Michael 

0 Kudos
Bram_S_
New Contributor I
1,291 Views

 

>Unfortunately I can't help with Linux driver questions/issues. We do have some places you can go for help though.

Thanks Michael,

Full analysis continued here: https://lists.freedesktop.org/archives/mesa-dev/2016-September/127960.html

0 Kudos
Reply