]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Increase the size of M_VG_ERRTXT from 512B to 4KB, increasing the size of C++
authorNicholas Nethercote <n.nethercote@gmail.com>
Mon, 18 Oct 2004 15:47:18 +0000 (15:47 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Mon, 18 Oct 2004 15:47:18 +0000 (15:47 +0000)
names that can be demangled.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2787

coregrind/core.h
coregrind/vg_errcontext.c
coregrind/vg_symtab2.c
coregrind/vg_to_ucode.c

index 68ebcfe693d718e4e5199cb3cefff3236ec8c358..4a972b1125a47172159596dd8ae968780b3f7292 100644 (file)
 #define M_VG_LIBNAMESTR 100
 
 /* Max length of a text fragment used to construct error messages. */
-#define M_VG_ERRTXT 512
+#define M_VG_ERRTXT 4096
 
 /* Max length of the string copied from env var VG_ARGS at startup. */
 #define M_VG_CMDLINE_STRLEN 1000
index 4ceda4237b9bee70369793b536e1140dadbf4316..5a2274ec5bed43dd34220e15057f734dcdd3ac9e 100644 (file)
@@ -332,7 +332,7 @@ void construct_error ( Error* err, ThreadId tid, ErrorKind ekind, Addr a,
 static void gen_suppression(Error* err)
 {
    Int         i;
-   UChar       buf[M_VG_ERRTXT];
+   static UChar buf[M_VG_ERRTXT];
    Bool        main_done = False;
    ExeContext* ec      = VG_(get_error_where)(err);
    Int         stop_at = VG_(clo_backtrace_size);
@@ -986,8 +986,8 @@ static Supp* is_suppressible_error ( Error* err )
 {
    Int i;
 
-   Char caller_obj[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
-   Char caller_fun[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
+   static Char caller_obj[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
+   static Char caller_fun[VG_N_SUPP_CALLERS][M_VG_ERRTXT];
 
    Supp* su;
 
index 34daa6961e16e7f9fdc438f5a3c78890a300e443..87f21c5f752e1839291362480f6ef00855652635 100644 (file)
@@ -2145,9 +2145,9 @@ Char* VG_(describe_eip)(Addr eip, Char* buf, Int n_buf)
    UInt  lineno; 
    UChar ibuf[20];
    UInt  n = 0;
-   UChar buf_fn[M_VG_ERRTXT];
-   UChar buf_obj[M_VG_ERRTXT];
-   UChar buf_srcloc[M_VG_ERRTXT];
+   static UChar buf_fn[M_VG_ERRTXT];
+   static UChar buf_obj[M_VG_ERRTXT];
+   static UChar buf_srcloc[M_VG_ERRTXT];
    Bool  know_fnname  = VG_(get_fnname) (eip, buf_fn,  M_VG_ERRTXT);
    Bool  know_objname = VG_(get_objname)(eip, buf_obj, M_VG_ERRTXT);
    Bool  know_srcloc  = VG_(get_filename_linenum)(eip, buf_srcloc, M_VG_ERRTXT, 
@@ -2185,7 +2185,7 @@ Char* VG_(describe_eip)(Addr eip, Char* buf, Int n_buf)
 void VG_(mini_stack_dump) ( Addr eips[], UInt n_eips )
 {
    UInt  i;
-   UChar buf[M_VG_ERRTXT];
+   static UChar buf[M_VG_ERRTXT];
    Bool  main_done = False;
 
    Int stop_at = n_eips;
index c4832ae6aa3462c32c41464143441c1e3586451e..afd4804b6bc200ebbac6db7c0689c24ad1d7adc3 100644 (file)
@@ -3857,7 +3857,7 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
    Int   t1, t2, t3, t4;
    UChar dis_buf[50];
    Int   am_sz, d_sz;
-   Char  loc_buf[M_VG_ERRTXT];
+   static Char  loc_buf[M_VG_ERRTXT];
 
    /* Holds eip at the start of the insn, so that we can print
       consistent error messages for unimplemented insns. */