Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #956
Closed
Open
Issue created Nov 28, 2014 by Derek Bruening@derekbrueningContributor

CRASH using libpthread in a client

From gokcehan...@gmail.com on October 19, 2012 06:16:31

For the Summary, please follow the guidelines at https://code.google.com/p/dynamorio/wiki/BugReporting and use one of the CRASH, APP CRASH, HANG, or ASSERT keywords What version of DynamoRIO are you using? 3.2.0-3 What operating system version are you running on? 64 bit Ubuntu 12.04 Linux kernel 3.2.0-32-generic What application are you running? a simple systemc example:

\#include "systemc.h"

SC_MODULE(first) {
    SC_CTOR(first) {
        SC_THREAD(first_foo);
    }
    void first_foo() {
        cout \<< "hello from first module\n";
    }
};

SC_MODULE(second) {
    SC_CTOR(second) {
        SC_THREAD(second_foo);
    }
    void second_foo() {
        cout \<< "hello from second module\n";
    }
};

SC_MODULE(top) {
    first *f;
    second *s;
    SC_CTOR(top) {
        f = new first("1st");
        s = new second("2nd");
    }
};

int sc_main(int argc, char* argv[]) {
    top("top");
    sc_start();
    return 0;
} Is your application 32-bit or 64-bit? 64-bit How are you running the application under DynamoRIO? drrun -client /PATH/TO/DR/bin/libwrapperpp.so 0 "" /PATH/TO/APP/a.out What happens when you run without any client? it gives me the regular application output in addition to the first two lines about basename such as:

basename: missing operand
Try `basename --help' for more information.

             SystemC 2.3.0-ASI --- Sep 20 2012 23:24:20
        Copyright (c) 1996-2012 by all Contributors,
        ALL RIGHTS RESERVED

hello from first module
hello from second module

What happens when you run with debug build ("-debug" flag to drrun/drconfig/drinject)? Same crash with/without -debug flag. This is the output when run with -debug: <Starting application a.out (6490)> <Initial options = -client_lib '/PATH/TO/DR/ bin/libwrapperpp.so;0;' -code_api -stack_size 56K -max_elide_jmp 0 -max_elide_ca ll 0 -no_inline_ignored_syscalls -no_native_exec -no_indcall2direct > Segmentation fault (core dumped) What steps will reproduce the problem? I have prepared a minimal example of the client where I observe the crash:

\#include "dr_api.h"
\#include "drwrap.h"
\#include "drsyms.h"

\#include \<systemc>  // this is the header of my application library

static void event_exit(void);

DR_EXPORT void
dr_init(client_id_t id)
{
    drwrap_init();
    drsym_init(0);
    dr_printf("tracing started..\n");
    dr_register_exit_event(event_exit);
}

static void
event_exit()
{
    drwrap_exit();
    drsym_exit();
    dr_printf("tracing finished..\n");
}

If I exclude #include \<systemc> it works fine. If I include, I get a segmentation fault. What is the expected output? What do you see instead? Is this an application crash, a DynamoRIO crash, a DynamoRIO assert, or a hang (see https://code.google.com/p/dynamorio/wiki/BugReporting and set the title appropriately)? I would expect just the output of my systemc program since I haven't really done anything in my client. Please provide any additional information below. Just to clear it out, DynamoRIO works fine with SystemC applications, it just doesn't like it when I try to include systemc header in my client.

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=956

Assignee
Assign to
Time tracking