The problem is that we're now generating many more temporaries than before, and running out of the statically allocated amount. Changing a debug assert to a full assert will change the SEGV into an ABRT. :-)
diff --git a/tcg/tcg.c b/tcg/tcg.c index 8f8badb61c..c376afe56a 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1207,7 +1207,7 @@ void tcg_func_start(TCGContext *s) static inline TCGTemp *tcg_temp_alloc(TCGContext *s) { int n = s->nb_temps++; - tcg_debug_assert(n < TCG_MAX_TEMPS); + g_assert(n < TCG_MAX_TEMPS); return memset(&s->temps[n], 0, sizeof(TCGTemp)); }
The problem can be worked around temporarily by increasing the number of temporaries:
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 504c5e9bb0..8fe32bb03c 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -275,7 +275,7 @@ typedef struct TCGPool {
#define TCG_POOL_CHUNK_SIZE 32768
-#define TCG_MAX_TEMPS 512 +#define TCG_MAX_TEMPS 2048 #define TCG_MAX_INSNS 512
/* when the size of the arguments of a called function is smaller than
But a proper solution is to dynamically allocate the temps.
The problem is that we're now generating many more temporaries
than before, and running out of the statically allocated amount.
Changing a debug assert to a full assert will change the SEGV
into an ABRT. :-)
diff --git a/tcg/tcg.c b/tcg/tcg.c .c376afe56a 100644 start(TCGContex t *s) alloc(TCGContex t *s) &s->temps[ n], 0, sizeof(TCGTemp));
index 8f8badb61c.
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1207,7 +1207,7 @@ void tcg_func_
static inline TCGTemp *tcg_temp_
{
int n = s->nb_temps++;
- tcg_debug_assert(n < TCG_MAX_TEMPS);
+ g_assert(n < TCG_MAX_TEMPS);
return memset(
}
The problem can be worked around temporarily by increasing the
number of temporaries:
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h .8fe32bb03c 100644
index 504c5e9bb0.
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -275,7 +275,7 @@ typedef struct TCGPool {
#define TCG_POOL_CHUNK_SIZE 32768
-#define TCG_MAX_TEMPS 512
+#define TCG_MAX_TEMPS 2048
#define TCG_MAX_INSNS 512
/* when the size of the arguments of a called function is smaller than
But a proper solution is to dynamically allocate the temps.