You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we use the JIT, and make a call to foo, free the code for foo, and then call bar, we'll access freed memory. Of course, you won't notice the problem until something else is allocated in the freed region, but if you poison freed memory it's easier to detect.
This also interferes with reattempting to JIT machine code, which I was working on when I found this bug. I ran into it because I free the machine code before retrying, and if the function allocated any globals before reattempting, the old addresses are saved in the GlobalValue to address map.
I've attached a failing test case, and I'm working on a fix.
The text was updated successfully, but these errors were encountered:
Extended Description
Consider the program:
int counter = 0;
void foo() { return ++counter; }
void bar() { return ++counter; }
If we use the JIT, and make a call to foo, free the code for foo, and then call bar, we'll access freed memory. Of course, you won't notice the problem until something else is allocated in the freed region, but if you poison freed memory it's easier to detect.
This also interferes with reattempting to JIT machine code, which I was working on when I found this bug. I ran into it because I free the machine code before retrying, and if the function allocated any globals before reattempting, the old addresses are saved in the GlobalValue to address map.
I've attached a failing test case, and I'm working on a fix.
The text was updated successfully, but these errors were encountered: