Bug 390866

Summary: "at" is doubled in "Block was alloc'd at"
Product: [Developer tools] valgrind Reporter: Tim Landscheidt <tim>
Component: memcheckAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: scott
Priority: NOR    
Version: 3.13.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tim Landscheidt 2018-02-21 20:37:58 UTC
For example memcheck/tests/doublefree.stderr.exp:

| Invalid free() / delete / delete[] / realloc()
|    at 0x........: free (vg_replace_malloc.c:...)
|    by 0x........: main (doublefree.c:10)
|  Address 0x........ is 0 bytes inside a block of size 177 free'd
|    at 0x........: free (vg_replace_malloc.c:...)
|    by 0x........: main (doublefree.c:10)
|  Block was alloc'd at
|    at 0x........: malloc (vg_replace_malloc.c:...)
|    by 0x........: main (doublefree.c:8)

reads as:

- "Invalid free() / delete / delete[] / realloc() at […] by […]"
- "Address 0x........ is 0 bytes inside a block of size 177 free'd at […] by […]"
- "Block was alloc'd at at (sic!) […] by […]"

The "at" at the end of "Block was alloc'd at" should (probably, haven't tested what side effects that'd have) be removed.
Comment 1 Scott Harvey 2018-02-22 18:51:58 UTC
From what I can gather, this text is generated by the main Valgrind code, not the KDev plugin. I've searched the source code for both projects and the string "Block was alloc'd at" only appears in the Valgrind source. I don't think this is in our scope to fix.
Comment 2 Julian Seward 2018-08-06 08:51:15 UTC
You're right, it is ungrammatical.  I wonder how many output-parsing
GUIs will break if we change this, though.