[GHC] #11777: RTS source code issues
GHC
ghc-devs at haskell.org
Thu Mar 31 09:06:49 UTC 2016
#11777: RTS source code issues
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Tiago Silva <tiagosilva at hush.com> writes: Last night I started looking at
the C files used in GHC and noticed these issues:
{{{
/driver/utils/cwrapper.c : int main(int, char **);
}}}
`void *p` is apparently unused, even if the compiler optimizes it away..
you should check if something went missing.
{{{
/rts/RetainerProfile.c : static nat sanityCheckHeapClosure(StgClosure *)
}}}
`StgInfoTable *info` has the same issue as above
{{{
/rts/RetainerSet.c
#elif defined(RETAINER_SCHEME_CC)
// Retainer scheme 3: retainer = cost centre
void
printRetainerSetShort(FILE *f, RetainerSet *rs, nat max_length)
{
char tmp[max_length + 1];
int size;
nat j;
}
}}}
Unlike the other functions around it, this function does nothing. Its
variables are also not unused?
{{{
/rts/sm/MarkWeak.c : void markWeakPtrList (void);
if (w->header.info == &stg_DEAD_WEAK_info) {
last_w = &(w->link);
} else {
last_w = &(w->link);
}
}}}
Not sure what's going on here. Regardless of the test the two branches do
the same thing.
{{{
/rts/win32/IOManager.c : AddIORequest, AddDelayRequest, AddProcRequest
functions
}}}
If `(!ioMan || !wItem)` the functions either return 0 or FALSE, but they
don't free `wItem` before. Is this optimized by the compiler?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11777>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list