Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: please remove uses of log.Fatal* as they don't allow any recoveries nor cleanups and immediately invoke os.Exit #294

Open
odeke-em opened this issue Mar 15, 2024 · 0 comments

Comments

@odeke-em
Copy link

odeke-em commented Mar 15, 2024

Summary of Bug

If we look at this code

sommelier/app/export.go

Lines 59 to 63 in 3157d97

for _, addr := range jailAllowedAddrs {
_, err := sdk.ValAddressFromBech32(addr)
if err != nil {
log.Fatal(err)
}
and
log.Fatal(err)
we can see the invocation of log.Fatal which will immediately terminate the program having invoked os.Exit, not allowing for any deferred cleanups. Even more, the code all around it uses panic(err)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant