Jan-Jaap van der Geer <[email protected]> wrote:
> I made some local changes to the glib2 library, which were
> neccessary for Vala, but I think they have been obsoleted both by
> new glib releases and some changes in the repository. I should
> check that, I suppose.
I just checked this, but it is not the case. I have a local change
and without this, vala crashes even when doing a simple "valac
--help".
I feel my change is a bit hacky, so instead of committing it, I'll
include it here. Anyone any idea for a more proper solution to the
problem?
Cheers,
Jan-Jaap
>>>>
--- glib/gprintf.c.orig 2009-03-10 23:27:07.000000000 +0100
+++ glib/gprintf.c 2009-03-10 23:27:16.000000000 +0100
@@ -303,7 +303,7 @@
{
gint len;
g_return_val_if_fail (string != NULL, -1);
-
+/*
#if !defined(HAVE_GOOD_PRINTF)
len = _g_gnulib_vasprintf (string, format, args);
@@ -311,7 +311,7 @@
*string = NULL;
#elif defined (HAVE_VASPRINTF)
-
+*/
len = vasprintf (string, format, args);
if (len < 0)
*string = NULL;
@@ -322,7 +322,7 @@
free (*string);
*string = string1;
}
-
+/*
#else
{
@@ -336,7 +336,7 @@
va_end (args2);
}
#endif
-
+*/
return len;
}
<<<<
The segfault without this patch:
Fatal signal received: Segmentation fault
Stack backtrace:
Running thread 0x3cf27c
( 7d7f38) pc: 34fa4c lr: 350060 sp: 7d7f3c __write_backtrace()
( 7d7fa0) pc: 34fc04 lr: 33ae44 sp: 7d7fa4 __unixlib_raise_signal()
( 7d7fb0) pc: 33ad48 lr: 2f20ec sp: 7d69bc __h_cback()
Register dump at 007d7fb4:
a1: 7d6a00 a2: 39b3d4 a3: 7d6a44 a4: 7d6a00
v1: 39b3c0 v2: 3d9f10 v3: fb415184 v4: 0
v5: e59ff2b8 v6: 7d69d4 sl: 7d6210 fp: 7d69f8
ip: 7d69d4 sp: 7d69bc lr: 2f20ec pc: 2f5494
cpsr: 20000010
002f5480 : Ú-é : e92dda80 : STMDB R13!,{R7,R9,R11,R12,R14,PC}
002f5484 : |på : e59f707c : LDR R7,&002F5508
002f5488 : .pà : e08f7007 : ADD R7,PC,R7
002f548c : .è : e8970180 : LDMIA R7,{R7,R8}
002f5490 : .å : e5988000 : LDR R8,[R8,#0]
002f5494 : .rç : e7987207 : LDR R7,[R8,R7,LSL #4]
002f5498 : .°Lâ : e24cb004 : SUB R11,R12,#4
002f549c : ..]á : e15d000a : CMP R13,R10
002f54a0 : .A.» : bb014111 : BLLT &003458EC
( 7d69f8) pc: 2f2098 lr: 2d69a0 sp: 7d69fc IA__g_vasprintf()
( 7d6a20) pc: 2d6930 lr: 2d6b54 sp: 7d6a24
IA__g_string_append_vprintf()
( 7d6a3c) pc: 2d6b24 lr: 2be7d8 sp: 7d6a4c
IA__g_string_append_printf()
( 7d6ed0) pc: 2be67c lr: 2bf318 sp: 7d6ed4
IA__g_option_context_get_help()
( 7d6ef4) pc: 2bf2ec lr: 2c1424 sp: 7d6ef8 ^print_help()
( 7d6f94) pc: 2c1170 lr: ab40 sp: 7d6f98
IA__g_option_context_parse()
( 7d6fd8) pc: aad8 lr: ad9c sp: 7d6fdc ^vala_compiler_main()
( 7d6ff4) pc: ad74 lr: 34556c sp: 7d6ff8 main()
_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK