Navigation Menu

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 · Fixed by #9588
Closed

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

kumarvikash1 opened this issue Jul 26, 2018 · 3 comments · Fixed by #9588
Labels
area: Boards bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Milestone

Comments

@kumarvikash1
Copy link

kumarvikash1 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: ^~~~~~~~~~~~

@kumarvikash1 kumarvikash1 added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug area: Boards labels Jul 26, 2018
@andrewboie
Copy link
Contributor

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

@dcpleung
Copy link
Member

dcpleung 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
Copy link
Contributor

inakypg 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
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 pushed a commit that referenced this issue Aug 27, 2018
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Boards bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants