From: millerlf@telus.net (lloyd)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] user prog sensors seg faults
Date: Tue, 16 May 2006 06:31:40 +0000 [thread overview]
Message-ID: <446971CC.3050409@telus.net> (raw)
In-Reply-To: <445F4C46.8000800@telus.net>
"Mark M. Hoffman" <mhoffman at lightlink.com> wrote:
| > I did a debuging link of sensors and got the exact place where it crashes:
| >
| >
| > | Program received signal SIGSEGV, Segmentation fault.
| > | 0x000000000041e910 in sensors_read_one_sysfs_chip (dev=0x550230)
| > | at lib/sysfs.c:57
| > | 57 if (attr->len >= 11 && !strcmp(attr->value + attr->len
| > - 11,
| >
| >
| > (gdb) backtrace
| > #0 0x000000000041e910 in sensors_read_one_sysfs_chip (dev=0x550230)
| > at lib/sysfs.c:57
| > #1 0x000000000041eb82 in sensors_read_sysfs_chips () at lib/sysfs.c:154
| > #2 0x000000000041e609 in sensors_init (input=0x54e6a0) at lib/init.c:45
| > #3 0x000000000040210c in main (argc=2, argv=0x7ffffb0a2168)
| > at prog/sensors/main.c:237
| Can you set a breakpoint at that line (lib/sysfs.c:57) and tell me
what are the contents of attr->len and attr->value? Thanks
(gdb) run
Starting program: /home/lloyd/lm_sensors/lm_sensors-2.10.0/prog/sensors/sensors
Program received signal SIGSEGV, Segmentation fault.
0x000000000041e910 in sensors_read_one_sysfs_chip (dev=0x550230)
at lib/sysfs.c:57
57 if (attr->len >= 11 && !strcmp(attr->value + attr->len - 11,
(gdb) p attr
$1 = (struct sysfs_attribute *) 0x5524b0
(gdb) p *attr
$2 = {name = "name", '\0' <repeats 46 times>, "/sys/devices/p",
path = "latform/i2c-9191/9191-0480/name", '\0' <repeats 218 times>, "&U\000\000\000\000", value = 0x1000b <Address 0x1000b out of bounds>, len = 33,
method = 0}
(gdb)
... so I looks like the name and path are messed up as well as the value pointer. the len of 33 might be ok, who knows.
next prev parent reply other threads:[~2006-05-16 6:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-08 13:48 [lm-sensors] user prog sensors seg faults lloyd
2006-05-10 3:51 ` Mark M. Hoffman
2006-05-13 22:17 ` Jean Delvare
2006-05-16 6:06 ` lloyd
2006-05-16 6:31 ` lloyd [this message]
2006-05-16 21:23 ` Jean Delvare
2006-05-17 3:24 ` Mark M. Hoffman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446971CC.3050409@telus.net \
--to=millerlf@telus.net \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.