Skip to content

Invalid: Memory alignment #159

Closed

Description

@ashvardanian

Describe the bug

There is a data alignment issue, that we have accounted for ahead of time, but haven't implemented the solution yet.
The index_config_t::vector_alignment controls, how to store vectors of add-ed elements in allocated memory.
Some platforms won't have an issue loading an 8-byte double, with an address that is not a multiple of 8.
Others will have that issue.
So the index_gt class has to be patched.

Steps to reproduce

Run the C++ unit test (available in VS code launchers) with -fsanitize=alignment address sanitizer flag set.

Expected behavior

No errors or warnings.

USearch version

v0.22.3

Operating System

Any

Hardware architecture

x86

Which interface are you using?

C++ implementation

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    invalid
    on Jul 21, 2023
  2. pinned this issue on Jul 21, 2023
  3. unpinned this issue on Jul 24, 2023
  4. linked a pull request that will close this issueAdd: Vector Alignment #162on Jul 24, 2023
  5. ashvardanian commented on Jul 30, 2023

    @ashvardanian
    MemberAuthor

    This was resolved by implementing a completely new serialization form and using separate memory allocators for vectors and neighbors lists.

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

Metadata

Metadata

Assignees

Labels

invalid

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions