[OSy] Drobna chyba v simulatore - segfault v interaktivnom mode

Ondrej Mikle ondrej.mikle at gmail.com
Thu Oct 28 15:33:54 CEST 2004


V interaktivnom mode simulator sposobi segmentation fault pri ukonceni
vystupu (napr. Ctrl+D).

Problemovy kod (machine.c):

286
287                     if (*commline) //<--tuto
288                             interpret( commline, -1);
289                     else

backtrace:
#0  0x0804d384 in interactive_control () at machine.c:288
#1  0x0804d487 in go_machine () at machine.c:345
#2  0x0804da1f in main (argc=0, args=0x0) at main.c:152

(gdb) p commline
$3 = 0x0  <--- na riadku 287 sa dereferencuje NULL pointer

Este jedna drobnost: pri kompilovani som si musel rucne v src/Makefile doplnit
LIBS = -lreadline -lcurses (povodne bolo len LIBS = -lreadline),
pretoze to nechcelo zlinkovat (pravdepodobne treba nieco zmenit v
configure).

Ondrej Mikle



More information about the NSWI004 mailing list