Skip to content

Commit ac8d48a

Browse files
committed
fix: gracefully handle failed assertion in release mode
1 parent eabfc56 commit ac8d48a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/function/graph.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static u64 _rd_functiongraph_weight(const RDGraph* g, RDGraphNode n, void* ud) {
6868
const RDFunctionGraphNode* d =
6969
_rd_functiongraph_node((const RDFunctionGraph*)g, n);
7070
assert(d && "node without chunk");
71-
return d->chunk.start;
71+
return d ? d->chunk.start : 0;
7272
}
7373

7474
static const char* _rd_functiongraph_dot_props(const RDGraph* g, RDGraphNode n,
@@ -135,6 +135,8 @@ bool rd_functiongraph_populate(RDFunctionGraph* self, RDAddress entry) {
135135

136136
RDFunctionGraphNode* fg_node = _rd_functiongraph_node(self, src);
137137
assert(fg_node);
138+
if(!fg_node) continue;
139+
138140
fg_node->noret_end = noret_end;
139141

140142
const RDChunkSucc* s;

0 commit comments

Comments
 (0)