This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/5603] glibc stack-smashing error in staprun on f8 0.6-1 build


------- Additional Comments From hunt at redhat dot com  2008-01-14 14:59 -------
Took a quick look at this.  Yes, the kallsyms parsing code does have a fixed
size buffer of 128 bytes, so if someone exports  a huge function name in a huge
module name, things will get messed up. Ironically, I rewrote this ugly stuff a
while ago when adding unwind data ago but did not check in yet because I saw no
need. 

Your hack works for now because /proc/kallsyms truncates function names to 127
bytes, so the maximum line length is around 200.  

My current code looks like this and has no limits

while ((ret = fscanf(kallsyms, "%llx %c %as [%as", &addr, &type, &name, &mod))>0 
               && dataptr < datamax) {
                if (ret < 3)
                        continue;
                if (ret > 3) {
                        /* ignore modules */
                        free(name);
                        free(mod);
                        continue;
                }

I could check in now if you wish.  The rest of the function is totally rewritten
too and requires I merge in some changes to other files, after stripping out my
uwind code.




-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5603

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]