So far, I haven't encounter this fail yet. I used powertop-1.13-3.1. -----Original Message----- From: discuss-boun...@lesswatts.org [mailto:discuss-boun...@lesswatts.org] On Behalf Of Cui, Dexuan Sent: Thursday, August 26, 2010 3:33 PM To: 'discuss@lesswatts.org' Subject: [Discuss] PowerTop: Segmentation fault in dump mode?
Hi everybody, I'm trying PowerTop 1.13 and I get a segfault when running "powertop --dump". The cause is: in dump mode, setup_windows() is not invoked so the *_window variables, like cstate_window, are still NULL; later in main() -> show_cstates(), the functions, like wrefresh(), will trigger segfault. In show_cstates(), I noticed the macro print does behave differently according to the 'dump' variable. Why not do the same handling for other functions like wrefresh()? BTW: in my environement, powertop in dump mode always segfaults in the wrefresh(), but doesn't fault in the werase() and wattroff/on(); and on other different host, powertop in dump mode doesn't segfault even if the pointer is also NULL! Maybe different versions of libraries (like ncurses) may behave slightly different? Anyway I'm not an expert of ncurses... Could anybody please fix the issue? I'm new to powertop. I suppose the others in the list would make a better patch. :-) Thanks, -- Dexuan _______________________________________________ Discuss mailing list Discuss@lesswatts.org http://lists.lesswatts.org/listinfo/discuss _______________________________________________ Discuss mailing list Discuss@lesswatts.org http://lists.lesswatts.org/listinfo/discuss