You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in line with how the C++ standard library's front and back methods on vector work. Is there a specific case where you have hit this null pointer dereference in practice?
I ran into this bug when writing cloneModule for my Alive2 for SIL GSoC project. The `SILCloner` infrastructure that `cloneModule` uses would trigger this bug for ceratin `SILModule`s.
My project mentor, CodaFi (JIRA User), recommended that we add an `assert` here instead of invoking undefined behavior.
Do we want to follow the C++ standard library's example in this case? If we do, then we should edit the `SILCloner` code that invoked the null pointer dereference.
Additional Detail from JIRA
md5: b4666bf8c44aac3523ff8b945b555370
Issue Description:
If `SILFunction.front()` link is called on a SILFunction that contains zero basic blocks, then `*begin()` will be a null pointer dereference.
The text was updated successfully, but these errors were encountered: