Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure in 'frontend' #10

Closed
fabsx00 opened this issue Sep 2, 2015 · 1 comment
Closed

Assertion failure in 'frontend' #10

fabsx00 opened this issue Sep 2, 2015 · 1 comment
Assignees

Comments

@fabsx00
Copy link

fabsx00 commented Sep 2, 2015

Hi,
I'm currently trying to link code originally written for rose-edg4x against the code in this repository and I'm encountering a strange problem. I've narrowed the code down to this short snippet:

#include <rose.h>

class MyProcessor
{public:
    MemoryMap memoryMap;
    virtual ~MyProcessor();
};
MyProcessor :: ~MyProcessor() { }

int main(int argc, char *argv[]) {
    SgProject* myProject = frontend(argc, argv);
}

When I compile and run the code against different x86 ELF binaries, I get the following assertion failure:

... /rose/include/rose/Sawyer/SharedPointer.h:363: static size_t Sawyer::SharedPointer<T>::releaseOwnership(Sawyer::SharedPointer<T>::Pointee*) [with T = Sawyer::Container::Buffer<long unsigned int, unsigned char>; size_t = long unsigned int; Sawyer::SharedPointer<T>::Pointee = Sawyer::Container::Buffer<long unsigned int, unsigned char>]: Assertion `rawPtr->SharedObject::nrefs_ > 0' failed.
Aborted

Running gdb shows that this happens inside 'frontend'. However, when I change the code to

#include <rose.h>

class MyProcessor
{public:
    MemoryMap memoryMap;
    virtual ~MyProcessor() { }
};

int main(int argc, char *argv[]) {
    SgProject* myProject = frontend(argc, argv);
}

the analysis runs fine. Any ideas?

@matzke1
Copy link
Contributor

matzke1 commented Sep 13, 2019

The MemoryMap API has changed somewhat since you reported this, so I'm closing this old issue. If you're still having a problem please create a new issue with updated example code. Thanks.

@matzke1 matzke1 closed this as completed Sep 13, 2019
tristanvdb pushed a commit that referenced this issue Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants