Commit 4fef1fcede8c7934a72b715f15fd7747c6b74618

Alexei Podtelezhnikov 2022-06-10T11:34:56

[smooth] Fix GCC LTO crashes on Windows. Fixes #1164 by using a volatile variable around `setjmp`. It is hard to say how this fixes crashes related to certain link-time optimizations. This does not decrease the rendering performance. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Use volatile `error`.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index bff3c59..28a081c 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1912,7 +1912,7 @@ typedef ptrdiff_t  FT_PtrDist;
   gray_convert_glyph_inner( RAS_ARG_
                             int  continued )
   {
-    int  error;
+    volatile int  error;
 
 
     if ( ft_setjmp( ras.jump_buffer ) == 0 )