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

Failure : "integer overflow in exp" on Altera-Max 10 platform #9135

Closed
kumarvikash1 opened this issue Jul 26, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@kumarvikash1
Copy link

commented Jul 26, 2018

Test zephyr/tests/kernel/init fails to build and throws an error " integer overflow in exp " .

Configuration :
nios2
Altera Max 10

Commit : 8ba0ddf

Error description :
zephyr/tests/kernel/init/src/main.c: In function ‘verify_bootdelay’:
build output: zephyr/tests/kernel/init/src/main.c:26:43: error: integer overflow in exp
build output: (CONFIG_BOOT_DELAY * NSEC_PER_USEC * USEC_PER_MSEC),
build output: ^
build output: zephyr/tests/ztest/include/ztest_assert.h:92:11: note: in definition of m
build output: _zassert(cond, msg ? ("(" default_msg ")") : (default_msg),
build output: ^~~~
build output: zephyr/tests/kernel/init/src/main.c:25:2: note: in expansion of macro ‘za
build output: zassert_true(SYS_CLOCK_HW_CYCLES_TO_NS64(current_cycles) >=
build output: ^~~~~~~~~~~~

@andrewboie

This comment has been minimized.

Copy link
Collaborator

commented Jul 26, 2018

Why is each line of the error message truncated? Where is the full error log?

@dcpleung

This comment has been minimized.

Copy link
Member

commented Aug 9, 2018

I tried to build for qemu_nios2 and altera_max10 with both commit 8ba0ddf and commit c8b5890. Both built fine without any errors. Is this still an issue?

@inakypg

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2018

Afaik yes (8b3fd69); setting the boot delay to 3000 (three seconds), I got an slightly different -- but same error for NIos2:

zephyr.git/tests/kernel/init/src/main.c:25:95: error: integer overflow in expression [-Werror=overflow] zassert_true(SYS_CLOCK_HW_CYCLES_TO_NS64(current_cycles) >=
cc1: all warnings being treated as errors

ajaykish added a commit to ajaykish/zephyr that referenced this issue Aug 23, 2018

tests: kernel: init: Fix integer overflow issue
Cast the msec to nsec conversion macro with u64_t to fix the
integer overflow issue.

Fixes zephyrproject-rtos#9135

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>

@nashif nashif added this to the v1.13.0 milestone Aug 26, 2018

@nashif nashif closed this in #9588 Aug 27, 2018

nashif added a commit that referenced this issue Aug 27, 2018

tests: kernel: init: Fix integer overflow issue
Cast the msec to nsec conversion macro with u64_t to fix the
integer overflow issue.

Fixes #9135

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>

metapsychologe added a commit to metapsychologe/zephyr that referenced this issue Sep 6, 2018

tests: kernel: init: Fix integer overflow issue
Cast the msec to nsec conversion macro with u64_t to fix the
integer overflow issue.

Fixes zephyrproject-rtos#9135

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>

dleach02 added a commit to dleach02/zephyr that referenced this issue Sep 10, 2018

tests: kernel: init: Fix integer overflow issue
Cast the msec to nsec conversion macro with u64_t to fix the
integer overflow issue.

Fixes zephyrproject-rtos#9135

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.