Skip to content

fix memory_mallctl_helper_test when jemalloc is installed#2555

Open
ahornby wants to merge 2 commits into
facebook:mainfrom
ahornby:export-D88594886
Open

fix memory_mallctl_helper_test when jemalloc is installed#2555
ahornby wants to merge 2 commits into
facebook:mainfrom
ahornby:export-D88594886

Conversation

@ahornby

@ahornby ahornby commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Summary:
Fix the cmake tests when jemalloc is found

memory_mallctl_helper_test wasn't linking to jemalloc when jemalloc was found so no way mallctl could work

Also link the string test to jemalloc if found as it has a check for it

Differential Revision: D88594886

)

Summary:

Fix intermittent failure in HeapVectorTypes.SimpleSetTest.  When 32 isn’t present and all elements are <32, lower_bound(32) legitimately returns end(). The test immediately did if (*it == 32), which dereferences an end iterator, causing UB.

Added a guard it == s2.end() before dereferencing.

There was also flakiness if 32 is present and if s2.lower_bound(32); returned a lower value than 32 as then 32 not erased.  Fixed by explicity erasing 32 before insert

Differential Revision: D88592733
Summary:
Fix the cmake tests when jemalloc is found

memory_mallctl_helper_test wasn't linking to jemalloc when jemalloc was found so no way mallctl could work

Also link the string test to jemalloc if found as it has a check for it

Differential Revision: D88594886
@meta-cla meta-cla Bot added the CLA Signed label Jan 12, 2026
@meta-codesync

meta-codesync Bot commented Jan 12, 2026

Copy link
Copy Markdown

@ahornby has exported this pull request. If you are a Meta employee, you can view the originating Diff in D88594886.

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