Xilinx / libsystemctlm-soc

SystemC/TLM-2.0 Co-simulation framework
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation
Other
222 stars 69 forks source link

Segmentation fault on get_posted() call #2

Closed vlenoirSemtech closed 5 years ago

vlenoirSemtech commented 5 years ago

When sending tlm_generic_payload through an initiator socket, a segmentation fault happens on get_posted() call. Indeed if genattr does not exist, for instance if get_extension() is not supported, the get_posted() method call is failing.

Code in remote-port-tlm-memory-slave.cc line 136 :

if (genattr->get_posted()) {
    return;
}

Problem can be fixed by testing genattr before :

if (genattr) {
    if (genattr->get_posted()) {
        return;
    }
}
edgarigl commented 5 years ago

Thanks, I'll commit a fix for this soon!