Skip to content
This repository

Fix format warnings due to half-word #2

Open
pabe opened this Issue · 0 comments

1 participant

pabe
pabe
Collaborator
pabe commented

Fix format warnings like (blow is just listed as an example)

  • hipe/hipe_bif2.c:93:5: warning: format '%0*lx' expects type 'long unsigned int', but argument 3 has type 'Eterm'
  • hipe/hipe_bif2.c:111:3: warning: format '%#lx' expects type 'long unsigned int', but argument 2 has type 'Eterm'
  • hipe/hipe_bif2.c:120:6: warning: format '%0*lx' expects type 'long unsigned int', but argument 5 has type 'Eterm'
Anden Anden referenced this issue from a commit
joewilliams General improvements to release_handler_1:get_supervised_procs
The core issues this patch attempts to solve is two fold, 1) have
release_handler_1 act slightly differently in two corner cases and 2)
clean up the code in get_supervised_procs/0 to remove nested cases and
etc.

Regarding #1, get_supervised_procs/0 will now call functions to
test to see if the supervisor is suspended before attempting to ask it
for a list of children. It now will print an error message regarding
the suspended supervisor and produce an error that will cause the VM
to restart. Previously it would timeout attempting the call to
which_children and the VM would restart without any details regarding
the reason.

The second corner case is if in a child specification a supervisor is
incorrectly stated to be a worker and get_modules is called against it.
A timeout will occur causing a VM restart. Similar to the last corner
case in this patch an error message is printed and an error is emitted
causing a VM restart.

When first looking into the issue it was hard to discover why my
upgrades where failing. All I received during the upgrade process was
a timeout and a VM restart, no other information. This patch should
help users track down issues like these.

Regarding #2, due to the above confusion in trying to figure out what
had happened I dug into the code and started tracing it through and
found that the nested case statements and etc made it confusing. So I
started to rework and clean up, hopefully making this code path clearer
to future readers.
feecf39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.