#2 temperature component - segfault

Slēgta
rjl6789 atvēra 4 gadi atpakaļ · 3 komentāri

Hi, thanks for this great project. I'm not a developer, just an enthusiast... so go easy ;-). Anyway, I noticed a *** stack smashing detected ***: terminated error for the temperature component.

After a bit of printf debugging I've come to the conclusion that the char name[16]; declaration was the culprit - enlarging it to PATH_MAX allowed the component to run without crashing. On my system (some output from printf'ing):

from 1st esnprintf: /sys/class/hwmon/hwmon8/name
name is: ucsi_source_psy_USBC000:001

i.e. bigger than 16.

I've no idea if there is a "sensible" value for this, PATH_MAX seems excessive... maybe 48?

Do you think this is worth a change to your code... maybe I'm just an outlier! (thinkpad t470s running pop!_os) :-)

Cheers

Hi, thanks for this great project. I'm not a developer, just an enthusiast... so go easy ;-). Anyway, I noticed a `*** stack smashing detected ***: terminated` error for the temperature component. After a bit of `printf` debugging I've come to the conclusion that the `char name[16];` declaration was the culprit - enlarging it to `PATH_MAX` allowed the component to run without crashing. On my system (some output from `printf`'ing): ``` from 1st esnprintf: /sys/class/hwmon/hwmon8/name name is: ucsi_source_psy_USBC000:001 ``` i.e. bigger than 16. I've no idea if there is a "sensible" value for this, `PATH_MAX` seems excessive... maybe 48? Do you think this is worth a change to your code... maybe I'm just an outlier! (thinkpad t470s running pop!_os) :-) Cheers
dm9pZCAq komentēja 4 gadi atpakaļ
Īpašnieks

thanks for your interest in the project and thanks for the bug report

may be you an outlier, but this bug must be fixed, so i'll fix it soon

thanks for your interest in the project and thanks for the bug report may be you an outlier, but this bug must be fixed, so i'll fix it soon
dm9pZCAq komentēja 4 gadi atpakaļ
Īpašnieks
[should be fixed](commit/101e10bbe1dbd4c687c5d4867718646b8fb54224)
rjl6789 komentēja 4 gadi atpakaļ
Autors

Thanks, I see what you did there. Very sneaky. Indeed, it is fixed.

Thanks, I see what you did there. Very sneaky. Indeed, it is fixed.
Pierakstieties, lai pievienotos šai sarunai.
Nav etiķešu
bug
Nav atskaites punktu
Nav atbildīgā
2 dalībnieki
Notiek ielāde...
Atcelt
Saglabāt
Vēl nav satura.