[vz-dev] 1wirevz Segmentation fault

Andreas Brus andreas at brus.name
Wed Sep 4 23:32:02 CEST 2013


(gdb) b ds1820init
und dort vzpath pruefen,

noch ok.
> und dann zumindest nochmal nach ds1820init()
> (gdb) b main.c:358
Da isses schon kaputt:
[Switching to Thread 0xb69e9000 (LWP 31879)]

Breakpoint 2, ds1820read (sensorid=0x12cdd "10-000802558178") at 
1wirevz.c:358
358                t = strndup ( temp_buffer +29, 5 ) ;
(gdb) print vzpath
$2 = 0x65383362 <Address 0x65383362 out of bounds>

Die Variable geht schon innerhalb der Schleife beim dritten Durchlauf 
kaputt:

Breakpoint 2, ds1820init () at 1wirevz.c:286
warning: Source file is more recent than executable.
286                fclose ( fp );
(gdb) print vzpath
$2 = 0x152e0 "vz/middleware.php"
(gdb) c
Continuing.

Breakpoint 2, ds1820init () at 1wirevz.c:286
286                fclose ( fp );
(gdb) print vzpath
$3 = 0x152e0 "vz/middleware.php"
(gdb) c
Continuing.

Breakpoint 2, ds1820init () at 1wirevz.c:286
286                fclose ( fp );
(gdb) print vzpath
$4 = 0x65383362 <Address 0x65383362 out of bounds>




More information about the volkszaehler-dev mailing list