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

Precommit fails after expanding magic string API #161

Closed
bzsolt opened this issue Jun 9, 2015 · 7 comments
Closed

Precommit fails after expanding magic string API #161

bzsolt opened this issue Jun 9, 2015 · 7 comments
Labels
critical Raises security concerns

Comments

@bzsolt
Copy link
Member

bzsolt commented Jun 9, 2015

After [723924f]](seanshpark@723924f) the precommit fails with the following message:

.../tests/unit/test_api.cpp:452:65: error: conversion to ‘uint32_t {aka unsigned int}’ from ‘long unsigned int’ may alter its value [-Werror=conversion]
   uint32_t num_magic_string_items = sizeof (magic_string_items) / sizeof (jerry_api_char_ptr_t);

Here is the mentoined line: L452
Refer: #136

@ruben-ayrapetyan ruben-ayrapetyan added the critical Raises security concerns label Jun 9, 2015
@bzsolt
Copy link
Member Author

bzsolt commented Jun 9, 2015

CC: @seanshpark

@ruben-ayrapetyan
Copy link
Contributor

@bzsolt, could you, please, check the following patch?

diff --git a/tests/unit/test_api.cpp b/tests/unit/test_api.cpp
index f002f35..ada2e6d 100644
--- a/tests/unit/test_api.cpp
+++ b/tests/unit/test_api.cpp
@@ -449,7 +449,7 @@ main (void)
   // External Magic String
   jerry_init (JERRY_FLAG_SHOW_OPCODES);

-  uint32_t num_magic_string_items = sizeof (magic_string_items) / sizeof (jerry_api_char_ptr_t);
+  uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_api_char_ptr_t));
   jerry_register_external_magic_strings (magic_string_items,
                                          num_magic_string_items,
                                          magic_string_lengths);

ruben-ayrapetyan added a commit that referenced this issue Jun 9, 2015
Related issue: #161

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
ruben-ayrapetyan added a commit that referenced this issue Jun 9, 2015
…esting was not performed on the architecture).

Related issue: #161

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
@bzsolt
Copy link
Member Author

bzsolt commented Jun 9, 2015

@ruben-ayrapetyan It is works. Thanks for the quick response.

@ruben-ayrapetyan
Copy link
Contributor

@bzsolt, thank you for checking.

@egavrin egavrin added this to the Core ECMA features milestone Jun 9, 2015
ruben-ayrapetyan added a commit that referenced this issue Jun 9, 2015
…ed because pre-commit testing was not performed in the combination).

Related issue: #161

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
@ruben-ayrapetyan
Copy link
Contributor

The issue occured because precommit testing wasn't performed on x86_64 machine with g++ 4.8.2 compiler.

@ruben-ayrapetyan
Copy link
Contributor

Fixed (#162).

@seanshpark
Copy link
Contributor

@bzsolt , Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical Raises security concerns
Projects
None yet
Development

No branches or pull requests

4 participants