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

A additional fix for issue #1247 ++ #1250

Merged
merged 2 commits into from
Sep 16, 2021
Merged

A additional fix for issue #1247 ++ #1250

merged 2 commits into from
Sep 16, 2021

Conversation

ampli
Copy link
Member

@ampli ampli commented Sep 16, 2021

  • Fix bad initial size of the "category" Disjunct field. Now it seems trivial but I had to install a vm for armv7l and use gdb...
  • On the same occasion: Fix non-portable union field order in Disjunct_struct (not a problem for this issue).

The code depends on is_category and num_categories to use identical
memory location. This would get violated if sizeof(int)!=sizeof(float)
or sizeof(char *)!=sizeof(Category_cost *).

Fixed by staring with is_category and num_categories, so they are
guaranteed to use the same memory.
@linas linas merged commit 251cfc4 into opencog:master Sep 16, 2021
@linas
Copy link
Member

linas commented Sep 16, 2021

Fix bad initial size of the "category"

Of course! That should have obvious!

#1247

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.

None yet

2 participants