Skip to content

CRASHER - referencing object that doesn't exist crashes the driver #981

@gesslar

Description

@gesslar

In this code

public void ask_for_set(object tp, object pattern) {
    ArmorSet *sets ;
    string path, *paths = pattern->query("sets") ;
}

If pattern is undefined, the driver crashes.

From gdb -p

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f8584fee46e in epoll_wait (epfd=4, events=events@entry=0x7f8582023300, maxevents=32, timeout=timeout@entry=50) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30      ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory.
(gdb) fg
Continuing.

Thread 1 "driver" received signal SIGSEGV, Segmentation fault.
find_object (str=0x0) at /frogdice/thresh/fluffos/src/vm/internal/simulate.cc:1466
1466      if (!filename_to_obname(str, tmpbuf, sizeof tmpbuf)) {
(gdb) fg
Continuing.

Thread 1 "driver" received signal SIGSEGV, Segmentation fault.
raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) fg
Continuing.
[Thread 0x7f8581bff700 (LWP 37445) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions