Skip to content

Conversation

@sivarajappan-siva
Copy link
Contributor

No description provided.

#ifdef HIBERNATE_SUPPORT_ENABLED
HibernateConfig Hibernate;
#endif
#ifndef __DISABLE_USE_COMPLEMENTARY_CODE_SET__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you verified by enabling the DISABLE_USE_COMPLEMENTARY_CODE_SET switch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh @sivarajappan-siva I must admit I didn't test that myself (blush) :)
It is more a "safety" mechanism so we can disable less essential stuff.
Might you try and hit issues (already caused by my changes) just let me know and I will help


if (customCode != 0) {
int24_t code;
if (Core::Frame::check_and_cast<int24_t, int32_t>(customCode, code) == true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are making

using uint24_t = uint32_t;
using int24_t = int32_t;

The 2 inputs to check_and_cast becomes <int32_t,int32_t> effectively making the method a no-op? check_and_cast will return true for every possible int32_t value that is passed in. It will not enforce the 24 bit constraint at all.
The next line does result = static_cast(code & 0xFFFFFF); which applies the real constraint by ignoring all the higher level bits than 24. Should we log this unexpected input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants