mbox series

[0/5] Remove assert()

Message ID 1511871803-10385-1-git-send-email-yamada.masahiro@socionext.com
Headers show
Series Remove assert() | expand

Message

Masahiro Yamada Nov. 28, 2017, 12:23 p.m. UTC
Buildman test passed.


Masahiro Yamada (5):
  Move CONFIG_PANIC_HANG to Kconfig
  ARM: openrd: set CONFIG_LOGLEVEL to 2
  Enable CONFIG_PANIC_HANG for boards without do_reset()
  treewide: convert assert() to BUG_ON()
  Remove assert()

 README                                      | 10 ----
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig   |  3 +
 arch/arm/mach-exynos/clock.c                |  4 +-
 arch/arm/mach-tegra/clock.c                 | 10 ++--
 arch/arm/mach-tegra/pinmux-common.c         | 80 +++++++++++++--------------
 arch/arm/mach-tegra/tegra114/clock.c        | 10 ++--
 arch/arm/mach-tegra/tegra124/clock.c        | 10 ++--
 arch/arm/mach-tegra/tegra20/clock.c         | 14 ++---
 arch/arm/mach-tegra/tegra210/clock.c        | 10 ++--
 arch/arm/mach-tegra/tegra30/clock.c         | 10 ++--
 arch/powerpc/cpu/mpc85xx/Kconfig            | 37 +++++++++++++
 arch/sandbox/cpu/state.c                    |  4 +-
 arch/x86/cpu/intel_common/mrc.c             |  2 +-
 arch/x86/lib/efi/efi.c                      |  2 +-
 arch/x86/lib/fsp/fsp_support.c              |  6 +-
 arch/x86/lib/physmem.c                      |  5 +-
 board/freescale/qemu-ppce500/qemu-ppce500.c |  8 +--
 cmd/bootefi.c                               |  2 +-
 cmd/mtdparts.c                              |  2 +-
 cmd/tpm_test.c                              | 28 +++++-----
 common/dlmalloc.c                           | 86 ++++++++++++++---------------
 common/fdt_support.c                        |  2 +-
 common/hwconfig.c                           | 36 ++++++------
 configs/TWR-P1025_defconfig                 |  1 +
 configs/UCP1020_SPIFLASH_defconfig          |  1 +
 configs/UCP1020_defconfig                   |  1 +
 configs/adp-ae3xx_defconfig                 |  1 +
 configs/cl-som-imx7_defconfig               |  1 +
 configs/evb-rk3229_defconfig                |  1 +
 configs/mccmon6_sd_defconfig                |  1 +
 configs/openrd_base_defconfig               |  2 +-
 configs/openrd_client_defconfig             |  2 +-
 configs/openrd_ultimate_defconfig           |  2 +-
 configs/opos6uldev_defconfig                |  1 +
 configs/qemu-ppce500_defconfig              |  1 +
 configs/tricorder_defconfig                 |  1 +
 configs/tricorder_flash_defconfig           |  1 +
 configs/uniphier_ld4_sld8_defconfig         |  1 +
 configs/uniphier_v7_defconfig               |  1 +
 configs/uniphier_v8_defconfig               |  1 +
 configs/xpedite517x_defconfig               |  1 +
 configs/xpedite520x_defconfig               |  1 +
 configs/xpedite537x_defconfig               |  1 +
 configs/xpedite550x_defconfig               |  1 +
 drivers/clk/clk-uclass.c                    |  2 +-
 drivers/clk/rockchip/clk_rk3036.c           | 23 ++++----
 drivers/clk/rockchip/clk_rk3188.c           | 28 ++++------
 drivers/clk/rockchip/clk_rk322x.c           | 23 ++++----
 drivers/clk/rockchip/clk_rk3288.c           | 36 +++++-------
 drivers/clk/rockchip/clk_rk3328.c           |  8 +--
 drivers/clk/rockchip/clk_rk3368.c           |  4 +-
 drivers/clk/rockchip/clk_rk3399.c           | 51 +++++++----------
 drivers/clk/rockchip/clk_rv1108.c           |  2 +-
 drivers/core/device-remove.c                |  8 +--
 drivers/core/device.c                       |  2 +-
 drivers/core/ofnode.c                       | 24 ++++----
 drivers/core/uclass.c                       |  4 +-
 drivers/gpio/gpio-uclass.c                  |  2 +-
 drivers/i2c/i2c-uclass.c                    |  2 +-
 drivers/input/input.c                       |  4 +-
 drivers/input/key_matrix.c                  |  2 +-
 drivers/misc/cros_ec.c                      | 10 ++--
 drivers/misc/cros_ec_i2c.c                  |  4 +-
 drivers/mtd/nand/tegra_nand.c               |  2 +-
 drivers/mtd/spi/sandbox.c                   |  4 +-
 drivers/net/fsl-mc/mc.c                     |  2 +-
 drivers/phy/phy-uclass.c                    |  2 +-
 drivers/power/tps6586x.c                    |  4 +-
 drivers/rtc/rtc-uclass.c                    | 10 ++--
 drivers/sound/sound.c                       |  2 +-
 drivers/spi/exynos_spi.c                    |  6 +-
 drivers/usb/emul/sandbox_flash.c            |  2 +-
 drivers/usb/host/usb-uclass.c               |  4 +-
 drivers/video/stb_truetype.h                |  2 +-
 fs/ext4/dev.c                               |  2 +-
 fs/ext4/ext4_common.c                       |  2 +-
 fs/ext4/ext4_journal.c                      |  2 +-
 fs/fat/fat.c                                |  2 +-
 include/common.h                            | 15 -----
 include/configs/B4860QDS.h                  |  1 -
 include/configs/C29XPCIE.h                  |  1 -
 include/configs/MPC8536DS.h                 |  1 -
 include/configs/MPC8544DS.h                 |  1 -
 include/configs/MPC8572DS.h                 |  1 -
 include/configs/P1010RDB.h                  |  1 -
 include/configs/P1023RDB.h                  |  2 -
 include/configs/P2041RDB.h                  |  1 -
 include/configs/T102xQDS.h                  |  1 -
 include/configs/T102xRDB.h                  |  1 -
 include/configs/T1040QDS.h                  |  1 -
 include/configs/T104xRDB.h                  |  1 -
 include/configs/T4240RDB.h                  |  1 -
 include/configs/UCP1020.h                   |  1 -
 include/configs/adp-ae3xx.h                 |  1 -
 include/configs/corenet_ds.h                |  1 -
 include/configs/cyrus.h                     |  1 -
 include/configs/ls1012a_common.h            |  1 -
 include/configs/ls1088a_common.h            |  2 -
 include/configs/ls2080a_common.h            |  2 -
 include/configs/p1_p2_rdb_pc.h              |  1 -
 include/configs/p1_twr.h                    |  1 -
 include/configs/qemu-ppce500.h              |  1 -
 include/configs/t4qds.h                     |  1 -
 include/configs/tricorder.h                 |  1 -
 include/configs/uniphier.h                  |  2 -
 include/configs/xpedite517x.h               |  1 -
 include/configs/xpedite520x.h               |  1 -
 include/configs/xpedite537x.h               |  1 -
 include/configs/xpedite550x.h               |  1 -
 include/configs/xtfpga.h                    |  4 --
 include/dm/ofnode.h                         |  4 +-
 include/efi_loader.h                        | 12 ++--
 lib/Kconfig                                 | 10 ++++
 lib/circbuf.c                               | 16 +++---
 lib/efi_loader/efi_boottime.c               |  2 +-
 lib/efi_loader/efi_device_path.c            |  2 +-
 lib/efi_loader/efi_file.c                   |  2 +-
 lib/efi_loader/efi_memory.c                 |  2 +-
 lib/fdtdec.c                                |  8 +--
 lib/membuff.c                               |  4 +-
 lib/physmem.c                               |  4 +-
 lib/qsort.c                                 |  2 +-
 lib/slre.c                                  |  8 +--
 lib/tiny-printf.c                           |  9 ---
 lib/vsprintf.c                              |  9 ---
 net/eth-uclass.c                            |  2 +-
 net/eth_legacy.c                            |  2 +-
 net/net.c                                   |  2 +-
 test/command_ut.c                           | 30 +++++-----
 test/compression.c                          | 16 +++---
 test/print_ut.c                             | 42 +++++++-------
 131 files changed, 442 insertions(+), 491 deletions(-)

Comments

Tom Rini Nov. 28, 2017, 2:52 p.m. UTC | #1
On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:

> Buildman test passed.

> 

> 

> Masahiro Yamada (5):

>   Move CONFIG_PANIC_HANG to Kconfig

>   ARM: openrd: set CONFIG_LOGLEVEL to 2

>   Enable CONFIG_PANIC_HANG for boards without do_reset()

>   treewide: convert assert() to BUG_ON()

>   Remove assert()


Have you done a size check on this series?  If not, I'll fire one up,
thanks!

-- 
Tom
Masahiro Yamada Nov. 28, 2017, 3:17 p.m. UTC | #2
2017-11-28 23:52 GMT+09:00 Tom Rini <trini@konsulko.com>:
> On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:
>
>> Buildman test passed.
>>
>>
>> Masahiro Yamada (5):
>>   Move CONFIG_PANIC_HANG to Kconfig
>>   ARM: openrd: set CONFIG_LOGLEVEL to 2
>>   Enable CONFIG_PANIC_HANG for boards without do_reset()
>>   treewide: convert assert() to BUG_ON()
>>   Remove assert()
>
> Have you done a size check on this series?  If not, I'll fire one up,
> thanks!
>

I think I did it correctly.

At least, I needed the following patch for openrd boards:
http://patchwork.ozlabs.org/patch/842106/

Looks like the NAND core pull-request needs it, too.
Tom Rini Nov. 29, 2017, 1:42 a.m. UTC | #3
On Wed, Nov 29, 2017 at 12:17:35AM +0900, Masahiro Yamada wrote:
> 2017-11-28 23:52 GMT+09:00 Tom Rini <trini@konsulko.com>:

> > On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:

> >

> >> Buildman test passed.

> >>

> >>

> >> Masahiro Yamada (5):

> >>   Move CONFIG_PANIC_HANG to Kconfig

> >>   ARM: openrd: set CONFIG_LOGLEVEL to 2

> >>   Enable CONFIG_PANIC_HANG for boards without do_reset()

> >>   treewide: convert assert() to BUG_ON()

> >>   Remove assert()

> >

> > Have you done a size check on this series?  If not, I'll fire one up,

> > thanks!

> >

> 

> I think I did it correctly.

> 

> At least, I needed the following patch for openrd boards:

> http://patchwork.ozlabs.org/patch/842106/

> 

> Looks like the NAND core pull-request needs it, too.


So, in my testing (which is gcc-6 for everything thanks to Debian/9):
06: Remove assert()
       arm:  +   clearfog peach-pi snow smdk5250 smdk5420 turris_omnia spring omap3_evm peach-pit
-(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 760 bytes
+(clearfog,turris_omnia) arm-linux-gnueabihf-ld.bfd: SPL image too big
+(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1080 bytes
+(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) arch/arm/mach-exynos/built-in.o: In function `clock_calc_best_scalar':
+(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) build/../arch/arm/mach-exynos/clock.c:1408: undefined reference to `panic'
+(omap3_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 28 bytes

And then a lot of platforms grow in size.  Taking a harder peek, BUG_ON
is always set.  However, assert() is only set when DEBUG is set.  Now, I
can certainly see an argument along the lines of that being fairly
unexpected, and I don't know that I would disagree.

After a very quick look over what git grep -l says, perhaps we want to
introduce a new (default off) option to preserve the current behavior of
assert() in BUG_ON, as it looks like almost only kernel imported code is
using BUG_ON.

-- 
Tom
Masahiro Yamada Nov. 29, 2017, 2:01 a.m. UTC | #4
2017-11-29 10:42 GMT+09:00 Tom Rini <trini@konsulko.com>:
> On Wed, Nov 29, 2017 at 12:17:35AM +0900, Masahiro Yamada wrote:
>> 2017-11-28 23:52 GMT+09:00 Tom Rini <trini@konsulko.com>:
>> > On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:
>> >
>> >> Buildman test passed.
>> >>
>> >>
>> >> Masahiro Yamada (5):
>> >>   Move CONFIG_PANIC_HANG to Kconfig
>> >>   ARM: openrd: set CONFIG_LOGLEVEL to 2
>> >>   Enable CONFIG_PANIC_HANG for boards without do_reset()
>> >>   treewide: convert assert() to BUG_ON()
>> >>   Remove assert()
>> >
>> > Have you done a size check on this series?  If not, I'll fire one up,
>> > thanks!
>> >
>>
>> I think I did it correctly.
>>
>> At least, I needed the following patch for openrd boards:
>> http://patchwork.ozlabs.org/patch/842106/
>>
>> Looks like the NAND core pull-request needs it, too.
>
> So, in my testing (which is gcc-6 for everything thanks to Debian/9):
> 06: Remove assert()
>        arm:  +   clearfog peach-pi snow smdk5250 smdk5420 turris_omnia spring omap3_evm peach-pit
> -(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 760 bytes
> +(clearfog,turris_omnia) arm-linux-gnueabihf-ld.bfd: SPL image too big
> +(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1080 bytes
> +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) arch/arm/mach-exynos/built-in.o: In function `clock_calc_best_scalar':
> +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) build/../arch/arm/mach-exynos/clock.c:1408: undefined reference to `panic'
> +(omap3_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 28 bytes
>
> And then a lot of platforms grow in size.  Taking a harder peek, BUG_ON
> is always set.  However, assert() is only set when DEBUG is set.  Now, I
> can certainly see an argument along the lines of that being fairly
> unexpected, and I don't know that I would disagree.
>
> After a very quick look over what git grep -l says, perhaps we want to
> introduce a new (default off) option to preserve the current behavior of
> assert() in BUG_ON, as it looks like almost only kernel imported code is
> using BUG_ON.
>

Do you have an idea for the option name?
Tom Rini Nov. 29, 2017, 2:30 a.m. UTC | #5
On Wed, Nov 29, 2017 at 11:01:02AM +0900, Masahiro Yamada wrote:
> 2017-11-29 10:42 GMT+09:00 Tom Rini <trini@konsulko.com>:

> > On Wed, Nov 29, 2017 at 12:17:35AM +0900, Masahiro Yamada wrote:

> >> 2017-11-28 23:52 GMT+09:00 Tom Rini <trini@konsulko.com>:

> >> > On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:

> >> >

> >> >> Buildman test passed.

> >> >>

> >> >>

> >> >> Masahiro Yamada (5):

> >> >>   Move CONFIG_PANIC_HANG to Kconfig

> >> >>   ARM: openrd: set CONFIG_LOGLEVEL to 2

> >> >>   Enable CONFIG_PANIC_HANG for boards without do_reset()

> >> >>   treewide: convert assert() to BUG_ON()

> >> >>   Remove assert()

> >> >

> >> > Have you done a size check on this series?  If not, I'll fire one up,

> >> > thanks!

> >> >

> >>

> >> I think I did it correctly.

> >>

> >> At least, I needed the following patch for openrd boards:

> >> http://patchwork.ozlabs.org/patch/842106/

> >>

> >> Looks like the NAND core pull-request needs it, too.

> >

> > So, in my testing (which is gcc-6 for everything thanks to Debian/9):

> > 06: Remove assert()

> >        arm:  +   clearfog peach-pi snow smdk5250 smdk5420 turris_omnia spring omap3_evm peach-pit

> > -(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 760 bytes

> > +(clearfog,turris_omnia) arm-linux-gnueabihf-ld.bfd: SPL image too big

> > +(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1080 bytes

> > +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) arch/arm/mach-exynos/built-in.o: In function `clock_calc_best_scalar':

> > +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) build/../arch/arm/mach-exynos/clock.c:1408: undefined reference to `panic'

> > +(omap3_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 28 bytes

> >

> > And then a lot of platforms grow in size.  Taking a harder peek, BUG_ON

> > is always set.  However, assert() is only set when DEBUG is set.  Now, I

> > can certainly see an argument along the lines of that being fairly

> > unexpected, and I don't know that I would disagree.

> >

> > After a very quick look over what git grep -l says, perhaps we want to

> > introduce a new (default off) option to preserve the current behavior of

> > assert() in BUG_ON, as it looks like almost only kernel imported code is

> > using BUG_ON.

> >

> 

> Do you have an idea for the option name?


ENABLE_BUG_ON_CHECKS ?

-- 
Tom
Masahiro Yamada Nov. 29, 2017, 3:02 a.m. UTC | #6
2017-11-29 11:30 GMT+09:00 Tom Rini <trini@konsulko.com>:
> On Wed, Nov 29, 2017 at 11:01:02AM +0900, Masahiro Yamada wrote:
>> 2017-11-29 10:42 GMT+09:00 Tom Rini <trini@konsulko.com>:
>> > On Wed, Nov 29, 2017 at 12:17:35AM +0900, Masahiro Yamada wrote:
>> >> 2017-11-28 23:52 GMT+09:00 Tom Rini <trini@konsulko.com>:
>> >> > On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:
>> >> >
>> >> >> Buildman test passed.
>> >> >>
>> >> >>
>> >> >> Masahiro Yamada (5):
>> >> >>   Move CONFIG_PANIC_HANG to Kconfig
>> >> >>   ARM: openrd: set CONFIG_LOGLEVEL to 2
>> >> >>   Enable CONFIG_PANIC_HANG for boards without do_reset()
>> >> >>   treewide: convert assert() to BUG_ON()
>> >> >>   Remove assert()
>> >> >
>> >> > Have you done a size check on this series?  If not, I'll fire one up,
>> >> > thanks!
>> >> >
>> >>
>> >> I think I did it correctly.
>> >>
>> >> At least, I needed the following patch for openrd boards:
>> >> http://patchwork.ozlabs.org/patch/842106/
>> >>
>> >> Looks like the NAND core pull-request needs it, too.
>> >
>> > So, in my testing (which is gcc-6 for everything thanks to Debian/9):
>> > 06: Remove assert()
>> >        arm:  +   clearfog peach-pi snow smdk5250 smdk5420 turris_omnia spring omap3_evm peach-pit
>> > -(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 760 bytes
>> > +(clearfog,turris_omnia) arm-linux-gnueabihf-ld.bfd: SPL image too big
>> > +(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1080 bytes
>> > +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) arch/arm/mach-exynos/built-in.o: In function `clock_calc_best_scalar':
>> > +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) build/../arch/arm/mach-exynos/clock.c:1408: undefined reference to `panic'
>> > +(omap3_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 28 bytes
>> >
>> > And then a lot of platforms grow in size.  Taking a harder peek, BUG_ON
>> > is always set.  However, assert() is only set when DEBUG is set.  Now, I
>> > can certainly see an argument along the lines of that being fairly
>> > unexpected, and I don't know that I would disagree.
>> >
>> > After a very quick look over what git grep -l says, perhaps we want to
>> > introduce a new (default off) option to preserve the current behavior of
>> > assert() in BUG_ON, as it looks like almost only kernel imported code is
>> > using BUG_ON.
>> >
>>
>> Do you have an idea for the option name?
>
> ENABLE_BUG_ON_CHECKS ?
>
> --

Do you mean CONFIG option?
i.e.  CONFIG_ENABLE_BUG_ON_CHECKS
so we can turn it on/off globally?
Tom Rini Nov. 29, 2017, 3:04 a.m. UTC | #7
On Wed, Nov 29, 2017 at 12:02:44PM +0900, Masahiro Yamada wrote:
> 2017-11-29 11:30 GMT+09:00 Tom Rini <trini@konsulko.com>:

> > On Wed, Nov 29, 2017 at 11:01:02AM +0900, Masahiro Yamada wrote:

> >> 2017-11-29 10:42 GMT+09:00 Tom Rini <trini@konsulko.com>:

> >> > On Wed, Nov 29, 2017 at 12:17:35AM +0900, Masahiro Yamada wrote:

> >> >> 2017-11-28 23:52 GMT+09:00 Tom Rini <trini@konsulko.com>:

> >> >> > On Tue, Nov 28, 2017 at 09:23:18PM +0900, Masahiro Yamada wrote:

> >> >> >

> >> >> >> Buildman test passed.

> >> >> >>

> >> >> >>

> >> >> >> Masahiro Yamada (5):

> >> >> >>   Move CONFIG_PANIC_HANG to Kconfig

> >> >> >>   ARM: openrd: set CONFIG_LOGLEVEL to 2

> >> >> >>   Enable CONFIG_PANIC_HANG for boards without do_reset()

> >> >> >>   treewide: convert assert() to BUG_ON()

> >> >> >>   Remove assert()

> >> >> >

> >> >> > Have you done a size check on this series?  If not, I'll fire one up,

> >> >> > thanks!

> >> >> >

> >> >>

> >> >> I think I did it correctly.

> >> >>

> >> >> At least, I needed the following patch for openrd boards:

> >> >> http://patchwork.ozlabs.org/patch/842106/

> >> >>

> >> >> Looks like the NAND core pull-request needs it, too.

> >> >

> >> > So, in my testing (which is gcc-6 for everything thanks to Debian/9):

> >> > 06: Remove assert()

> >> >        arm:  +   clearfog peach-pi snow smdk5250 smdk5420 turris_omnia spring omap3_evm peach-pit

> >> > -(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 760 bytes

> >> > +(clearfog,turris_omnia) arm-linux-gnueabihf-ld.bfd: SPL image too big

> >> > +(am335x_hs_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1080 bytes

> >> > +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) arch/arm/mach-exynos/built-in.o: In function `clock_calc_best_scalar':

> >> > +(snow,smdk5250,peach-pi,smdk5420,spring,peach-pit) build/../arch/arm/mach-exynos/clock.c:1408: undefined reference to `panic'

> >> > +(omap3_evm) arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 28 bytes

> >> >

> >> > And then a lot of platforms grow in size.  Taking a harder peek, BUG_ON

> >> > is always set.  However, assert() is only set when DEBUG is set.  Now, I

> >> > can certainly see an argument along the lines of that being fairly

> >> > unexpected, and I don't know that I would disagree.

> >> >

> >> > After a very quick look over what git grep -l says, perhaps we want to

> >> > introduce a new (default off) option to preserve the current behavior of

> >> > assert() in BUG_ON, as it looks like almost only kernel imported code is

> >> > using BUG_ON.

> >> >

> >>

> >> Do you have an idea for the option name?

> >

> > ENABLE_BUG_ON_CHECKS ?

> 

> Do you mean CONFIG option?

> i.e.  CONFIG_ENABLE_BUG_ON_CHECKS

> so we can turn it on/off globally?


Yes, a CONFIG option to turn it on/off.

-- 
Tom