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

Reply via email to