[Bf-committers] Bug #27167 : blender crash with "illegal hardware instruction" on amd x86 + call for testers

Kevin Roy kiniou at gmail.com
Wed Apr 27 01:26:56 CEST 2011


Hi everyone,

Some Debian users reported [1] a crash with blender (from 2.53 to
early 2.57) on amd 32bit computer because of some SSE2 instructions
enabled.
I've already reported this on #27167 and I give a shot in the ML.

One user sent the following patch that seems to fix both build and
execution on this kind of architecture :
************ Start of patch **************
diff -ru blender-2.56.1-beta-svn34076.orig/build_files/cmake/macros.cmake
blender-2.56.1-beta-svn34076/build_files/cmake/macros.cmake
--- blender-2.56.1-beta-svn34076.orig/build_files/cmake/macros.cmake	2010-12-23
00:09:30.000000000 +0100
+++ blender-2.56.1-beta-svn34076/build_files/cmake/macros.cmake	2011-04-23
19:45:14.297633657 +0200
@@ -220,7 +220,7 @@

 	# message(STATUS "Detecting SSE support")
 	if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-		set(CMAKE_REQUIRED_FLAGS "-msse -msse2")
+		set(CMAKE_REQUIRED_FLAGS "-msse -msse2 -O0")
 	elseif(MSVC)
 		set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ?
 	endif()
************* End of patch ***************

>From what I've investigate so far, SSE2 is tested only for
RAY_OPTIMIZATION however execution failed in RNA_def_property_range().

Program received signal SIGILL, Illegal instruction.
0x08b78c4d in RNA_def_property_range ()
(gdb) disassemble
-- snip --
   0x08b78c44 <+116>:	lea    0x0(%esi,%eiz,1),%esi
   0x08b78c48 <+120>:	fxch   %st(1)
   0x08b78c4a <+122>:	fstpl  -0x20(%ebp)
=> 0x08b78c4d <+125>:	cvttsd2si -0x20(%ebp),%ecx
   0x08b78c52 <+130>:	mov    %ecx,0x78(%eax)
   0x08b78c55 <+133>:	fstpl  -0x20(%ebp)
   0x08b78c58 <+136>:	cvttsd2si -0x20(%ebp),%edx
-- snip --

I'm suspecting a gcc bug but I'm maybe completely wrong :) and I'm not
familiar with this kind of bug involving specific hardware
instructions.
I can't reproduce the bug because I don't own any amd computer and it
makes my investigations harder. Therefore I'm looking for testers or
builders which are running a Debian Sid or are familiar with -msse(2)
in gcc.

Meanwhile, I will take a look at the wiki page about buildbot
configuration from Sergey.

Regards,

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599680
---
Kevin Roy


More information about the Bf-committers mailing list