Bugzilla – Attachment 51296 Details for
Bug 119803
gcc memory leak
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
Testcase
gccbug.c (text/plain), 866 bytes, created by
Jan Engelhardt
on 2005-10-01 13:55:14 UTC
(
hide
)
Description:
Testcase
Filename:
MIME Type:
Creator:
Jan Engelhardt
Created:
2005-10-01 13:55:14 UTC
Size:
866 bytes
patch
obsolete
>/* >Compile (`gcc -Wall -c gccbug.c` suffices) and run. Directly after >the compiler gives some warnings (or some seconds later), hit Ctrl+Z >and see the `ps uf` output. Memory leak -- you will at least notice >it when you run out of RAM and harddisk-backed swap will be used. > >Conditions that must hold true for the bug to appear: > >1. foomatic must be struct foo[] > No problem if it is just > struct foo foomatic = {.ptr = &sp->not_exist} > >2. "not_exist" must _not_ exist in struct bar > >3. bp->not_exist must appear in foomatic > >4. case UM_EQUERY must appear > if(e == UM_EQUERY) works >*/ > >struct foo { void *ptr; }; >struct bar { void *sth; }; > >void arro(struct bar *bp) { > struct foo foomatic[] = {{.ptr = &bp->not_exist}}; > return; >} > >int sw(int e) { > switch(e) { > case UM_EQUERY: > return 1; > } > return 0; >} > >//eof
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 119803
: 51296