[GHC] #11777: RTS source code issues
GHC
ghc-devs at haskell.org
Wed May 18 13:52:26 UTC 2016
#11777: RTS source code issues
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.10.3
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* keywords: => newcomer
* cc: erikd (added)
* component: Compiler => Runtime System
@@ -2,1 +2,4 @@
- the C files used in GHC and noticed these issues:
+ the C files used in GHC and noticed these issues [edit: this list now
+ shows only those issues that haven't been fixed yet]:
+
+ * driver/utils/dynwrapper.c:
@@ -4,1 +7,4 @@
- /driver/utils/cwrapper.c : int main(int, char **);
+ int main(int argc, char *argv[]) {
+ void *p;
+ ...
+ }
@@ -6,0 +12,1 @@
+
@@ -9,0 +16,3 @@
+
+
+ * rts/RetainerSet.c:
@@ -10,7 +20,0 @@
- /rts/RetainerProfile.c : static nat sanityCheckHeapClosure(StgClosure *)
- }}}
- `StgInfoTable *info` has the same issue as above
-
- {{{
- /rts/RetainerSet.c
-
@@ -32,0 +35,1 @@
+ * rts/win32/IOManager.c:
@@ -33,14 +37,1 @@
- /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
+ AddIORequest, AddDelayRequest, AddProcRequest functions
New description:
Tiago Silva <tiagosilva at hush.com> writes: Last night I started looking at
the C files used in GHC and noticed these issues [edit: this list now
shows only those issues that haven't been fixed yet]:
* driver/utils/dynwrapper.c:
{{{
int main(int argc, char *argv[]) {
void *p;
...
}
}}}
`void *p` is apparently unused, even if the compiler optimizes it away..
you should check if something went missing.
* 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/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?
--
Comment:
I removed some issues from the description that have since been fixed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11777#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list