Skip to content

UPSTREAM PR #30857: Add stack test for thunked sorted lookup#689

Open
loci-dev wants to merge 1 commit into
mainfrom
loci/pr-30857-add-stack-thunked-sort-find-test
Open

UPSTREAM PR #30857: Add stack test for thunked sorted lookup#689
loci-dev wants to merge 1 commit into
mainfrom
loci/pr-30857-add-stack-thunked-sort-find-test

Conversation

@loci-dev
Copy link
Copy Markdown

Note

Source pull request: openssl/openssl#30857

Add coverage for sorted lookup on a typed stack that has a generated comparison thunk installed.

The uchar stack test already constructs a typed stack with sk_uchar_new(&uchar_compare), which installs the generated safestack comparison thunk.
This change extends that test to sort a duplicated stack and then verify that sk_uchar_find can locate each value.

Rationale

Typed stacks created through sk_TYPE_new(cmp) install a comparison thunk used by stack lookup paths. This test documents that the generated thunk path remains compatible with sorted lookup after sk_TYPE_sort.

Testing

Tested the same change in configured build trees on Windows and Linux.

Windows, VC-WIN64A:

  • .\test\stack_test.exe
  • nmake test TESTS=test_stack

Linux, Ubuntu 24.04 x64:

  • ./test/stack_test
  • make test TESTS=test_stack

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.

2 participants