Ticket #5527 (closed bug: fixed)
mkTopLevEnv: not interpreted
|Reported by:||cdsmith||Owned by:||pcapriotti|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
When attempting to compile, load, and use a module several times per second with the GHC API, the compiler sometimes reports an error "mkTopLevEnv: not interpreted" for the module being loaded, even when that module isn't supposed to be interpreted.
The attached file exhibits the bug when runs multiple times in quick succession (less than a second apart). The important ingredients are:
1. The same file is being compiled each time. 2. The .hi and .o files still exist from the previous compile. 3. The compiles are happening less than a second apart.
There's some suspicion that this is a problem with timestamp resolution.
This happens at least as far back as 7.1, and has been confirmed in the latest i386-linux development snapshot (7.3, from Sep 6, 2011). The attached code is for 7.3, but analogous code for older versions shows the same bug.