Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Always initialize RData

Even though we normally initialize in Data further, we want to
initialize this anyway so in the case there are bugs they don't show
themselves as impossible to debug, but as a more normal segv because of
a null pointer dereference.
  • Loading branch information...
commit b08a25ee4e25ebf918c584fe2ea28230c859ffab 1 parent ef023b2
@dbussink dbussink authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 vm/capi/data.cpp
6 vm/capi/data.cpp
@@ -15,9 +15,9 @@ namespace rubinius {
type_ = cRData;
RData* rdata = new RData;
- // Yes, we initialize it with garbage data. This is because when
- // Data creates this, it makes sure to initialize it before
- // anyone sees it.
+ rdata->data = 0;
+ rdata->dmark = 0;
+ rdata->dfree = 0;
as_.rdata = rdata;

0 comments on commit b08a25e

Please sign in to comment.
Something went wrong with that request. Please try again.