Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
lib/gcov: Remove assert(0)
This follows CB:44047 which probably missed this because it's a custom assert macro (in code that has only recently been added to build checks). Without this change, building with gcov fails because gcc_assert(0) can be build-time verified (as introduced by CB:44044) while we need runtime failure semantics here.
Change-Id: I71a38631955a6a45abe90f2b9ce3a924cc5d6837 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M src/lib/gcov-glue.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/44105/1
diff --git a/src/lib/gcov-glue.c b/src/lib/gcov-glue.c index 101aec9..14f3e3e 100644 --- a/src/lib/gcov-glue.c +++ b/src/lib/gcov-glue.c @@ -82,7 +82,7 @@ static long ftell(FILE *stream) { /* ftell should currently not be called */ - gcc_assert(0); + BUG(); #if CONFIG(DEBUG_COVERAGE) printk(BIOS_DEBUG, "ftell %s\n", stream->filename); #endif
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44105/1/src/lib/gcov-glue.c File src/lib/gcov-glue.c:
https://review.coreboot.org/c/coreboot/+/44105/1/src/lib/gcov-glue.c@85 PS1, Line 85: BUG(); Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
Patch Set 1: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/44105/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44105/1//COMMIT_MSG@10 PS1, Line 10: custom assert macro Should we stop hacking/using assert() and provide a standard implementation instead? It seems to be custom on all ends by now, it doesn't stop execution (well, that's configurable) and developers have adapted to that and use it as a short-hand check. We could rename the current implementation and all its callers.
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44105/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44105/1//COMMIT_MSG@10 PS1, Line 10: custom assert macro
Should we stop hacking/using assert() and provide a standard […]
Sounds reasonable. warn_on() for what we currently have?
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
Patch Set 1:
Fast-tracking with three +2 to fix building master.
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44105 )
Change subject: lib/gcov: Remove assert(0) ......................................................................
lib/gcov: Remove assert(0)
This follows CB:44047 which probably missed this because it's a custom assert macro (in code that has only recently been added to build checks). Without this change, building with gcov fails because gcc_assert(0) can be build-time verified (as introduced by CB:44044) while we need runtime failure semantics here.
Change-Id: I71a38631955a6a45abe90f2b9ce3a924cc5d6837 Signed-off-by: Patrick Georgi pgeorgi@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/44105 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Nico Huber nico.h@gmx.de Reviewed-by: HAOUAS Elyes ehaouas@noos.fr --- M src/lib/gcov-glue.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved HAOUAS Elyes: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/lib/gcov-glue.c b/src/lib/gcov-glue.c index 101aec9..14f3e3e 100644 --- a/src/lib/gcov-glue.c +++ b/src/lib/gcov-glue.c @@ -82,7 +82,7 @@ static long ftell(FILE *stream) { /* ftell should currently not be called */ - gcc_assert(0); + BUG(); #if CONFIG(DEBUG_COVERAGE) printk(BIOS_DEBUG, "ftell %s\n", stream->filename); #endif