Skip to content

Conversation

@kwvg
Copy link
Collaborator

@kwvg kwvg commented Nov 19, 2025

Additional Information

Breaking Changes

None expected.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (note: N/A)
  • I have added or updated relevant unit/integration/functional/e2e tests (note: N/A)
  • I have made corresponding changes to the documentation (note: N/A)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

kwvg added 4 commits November 20, 2025 01:12
6169ee9c91 Merge pull request dashpay#120 from kwvg/bump_2.0
8b8e492967 chore: bump version to 2.0
e367139843 Merge pull request dashpay#119 from PastaPastaPasta/various-optimizations
6dc1515724 fix: include array
290a787340 fix: compilation error
44bbdd6d2e perf: CoreMPL::Aggregate needs a vector, this implicitly allocates vecPublicKeys.size() times
776a061b8b perf: remove unneeded SecAlloc in SignG2
7b1fb5a17f perf: remove unused bn_t one
e2ee41d376 perf: use reserve where trivial
b6c08aa624 perf: avoid extra allocations and copies in HashPubKeys
829291f4c2 fix: leak in HashPubKeys
b94489cb3e fix: memory leak in CoreMPL::AggregateSecure, call bn_free for each time we call bn_new
483003da88 fix: avoid allocation churn in DivFP; fix memory leak
6e7c89a18b fix: add a destructor to fix a memory leak
05a79d2b44 perf: avoid unneeded vector allocation in Add
d7958a05f6 Revert "perf: use unordered_set and fail fast in BasicSchemeMPL::AggregateVerify"
a19de6290b perf: use unordered_set and fail fast in BasicSchemeMPL::AggregateVerify
e25c2e34c7 perf: prefer serialize to array
7c1d20a6af perf: use serializeToArray
4e833dbc1f fix: include <array>
9141e14446 perf: in CoreMPL::Aggregate return array
10744ea62f perf: don't use vector for constant sized
2af62e2b62 Merge pull request dashpay#116 from kwvg/bump_mimalloc_3.0.10
7bec91a655 patch: add awareness for different page sizes
03bf222cad patch: swap conditions to evaluate emscripten-specific case earlier
cae3f99ee8 patch: s/mi_align_up_ptr/_mi_align_up_ptr/g
e79044797a ci: build with debug enabled
1ca74c12c8 build: prefer debug mimalloc lib over release lib for Rust and Go binds
c47c84e409 build: update build files for `mimalloc` subtree bump
a325850bfd build: harmonize cmake version across dependencies
f064d8fe7f depends: commit microsoft/mimalloc@dfa50c37 to source tree as da7905c9
da7905c923 Squashed 'depends/mimalloc/' changes from 91ba1f374..dfa50c37d
b4622d0c7a revert: update cmake
160dd95097 Merge pull request dashpay#117 from kwvg/homekeep_p2
79775723d9 revert: disable Go bindings CI for macos for now
ef58d4306a chore(ci): bump Go to 1.24
f4242f46df ci: add Rust 1.91 to build matrix, test bindings
fc54fc58c8 chore(ci): bump Python version matrix to test 3.10 to 3.13
2881362fd9 fix: account for API changes introduced in Python 3.13 in binds
3c7fa5c41c build: apply review suggestions for Go binds Makefile
3dafb33875 build: add Homebrew and MacPorts awareness in Go binds Makefile
bb72770c97 refactor: shuffle contents of Go binds Makefile
dd4766212b build: drop standalone library definition comments from Go binds
68905cdbad build: enable runtime assertions for WASM debug builds
9368177b81 build: ensure LINK_FLAGS actually propagate to blsjstmp
b0006ab1e9 Merge pull request dashpay#118 from kwvg/fix_sz
a47caad61a refactor: use the size of the buffer in the Python binds when possible
8b200a6640 fix: correct typo in Python bindings
f91afeec90 fix!: pass the actual size of the buffer from the Go bindings
9605703c78 fix!: pass the actual size of the buffer from the Rust bindings

git-subtree-dir: src/dashbls
git-subtree-split: 6169ee9c9141d209c2a576f0e2e99856b2ee3e25
@kwvg kwvg added this to the 23.1 milestone Nov 19, 2025
@github-actions
Copy link

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@kwvg kwvg marked this pull request as ready for review November 21, 2025 09:25
@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Walkthrough

This pull request substantially updates the dashbls project's build infrastructure and dependencies. The CI workflows in .github/workflows/ are expanded to include Rust bindings and updated Go/Python versions, with CMake builds now explicitly setting Debug mode. The top-level build configuration is restructured: Makefile.mimalloc.include realigns mimalloc source compilation and introduces new CPPFLAGS variables, while configure.ac bumps the library version to 2.0. The depends/mimalloc/ subtree undergoes a major upgrade, including CMake 3.18 requirement with expanded configuration options (sanitizers, architecture-specific optimizations, arena management), new Docker build environments, vcpkg packaging support, and extensive Doxygen documentation regeneration with numerous new public API functions (arena and sub-process management, abandoned-heap visitation, alignment helpers).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–60 minutes

Areas requiring extra attention:

  • CMake configuration expansion (depends/mimalloc/CMakeLists.txt): Substantial rework of build options, sanitizer logic, and public library naming scheme (mi_basenamemi_libname); verify platform-specific flag combinations and conditional logic for GCC/Clang/MSVC.
  • Mimalloc public API surface (depends/mimalloc/doc/mimalloc-doc.h and generated HTML docs): New types (mi_arena_id_t, mi_subproc_id_t) and functions (arena/sub-process management, abandoned-heap traversal); confirm API semantics and parameter types are consistent with implementation intent.
  • Build system integration (src/dashbls/Makefile.mimalloc.include): Verify that newly listed source files (alloc.c, arena.c, bitmap.c, etc.) compile correctly with the updated flags and that CPPFLAGS/CXXFLAGS/CFLAGS assignments don't conflict.
  • Workflow CI changes (build-binds.yml, build-test.yaml): Confirm Rust toolchain integration, new CMake -DCMAKE_BUILD_TYPE=Debug flag, and platform matrix combinations execute without errors.

Possibly related PRs

Suggested reviewers

  • knst
  • UdjinM6
  • PastaPastaPasta

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: updating the src/dashbls dependency to a specific commit hash with a clear subtree marker.
Description check ✅ Passed The description is related to the changeset, providing context about the dependency update, related upstream PRs, and expected hash verification.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/dashbls/depends/mimalloc/CMakeLists.txt (1)

357-367: Fix missing .c file extensions in set_source_files_properties() call

Line 360 lists test/test-api-fill and test/test-stress without .c extensions, but the actual files are test/test-api-fill.c and test/test-stress.c. CMake property matching is exact, so these files won't have the LANGUAGE property applied when MI_USE_CXX=ON, defeating the intent to compile them as C++.

Add the .c extensions to both test file references on line 360:

-  set_source_files_properties(src/static.c test/test-api.c test/test-api-fill test/test-stress PROPERTIES LANGUAGE CXX )
+  set_source_files_properties(src/static.c test/test-api.c test/test-api-fill.c test/test-stress.c PROPERTIES LANGUAGE CXX )
🧹 Nitpick comments (5)
src/dashbls/depends/mimalloc/contrib/docker/readme.md (1)

6-9: Consider clarifying the <host> placeholder for clarity.

The documentation uses <host> as a placeholder, but it's not immediately clear whether this refers to a Dockerfile name (e.g., alpine, manylinux) or a directory. A brief note explaining that <host> should be replaced with the name of one of the provided Dockerfiles would improve usability for new contributors.

For example:

-> > cd
+> cd # e.g., "alpine", "manylinux", etc.

docker build -t -mimalloc .
docker run -it -mimalloc

make test

src/dashbls/depends/mimalloc/contrib/vcpkg/readme.md (2)

30-30: Minor: Fix malformed markdown link.

The markdown link is missing the opening square bracket before "test/CMakeLists.txt".

Apply this diff:

-See [`test/CMakeLists.txt](../../test/CMakeLists.txt) for more examples.
+See [`test/CMakeLists.txt`](../../test/CMakeLists.txt) for more examples.

35-35: Minor: Fix typo in "vcpkg".

"vckpg" should be "vcpkg".

Apply this diff:

-The original port for vckpg was contributed by many people, including: @vicroms, @myd7349, @PhoubeHui, @LilyWangL,
+The original port for vcpkg was contributed by many people, including: @vicroms, @myd7349, @PhoubeHui, @LilyWangL,
src/dashbls/depends/mimalloc/bin/readme.md (1)

21-27: Fix markdown list indentation for linting compliance.

Markdown linter (MD007) expects unordered list items to have zero indentation. While the current indentation (2 spaces) does not break rendering, aligning with linting standards improves consistency.

-1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).
-
-2. Link your program explicitly with the `mimalloc.dll.lib` export library for
+1. Use the C-runtime library as a DLL (using the `/MD` or `/MDd` switch).
+
+2. Link your program explicitly with the `mimalloc.dll.lib` export library for
    the `mimalloc.dll` -- which contains all mimalloc functionality.
    To ensure the `mimalloc.dll` is actually loaded at run-time it is easiest 
    to insert some call to the mimalloc API in the `main` function, like `mi_version()`
    (or use the `/include:mi_version` switch on the linker, or
    similarly, `#pragma comment(linker, "/include:mi_version")` in some source file). 
    See the `mimalloc-test-override` project for an example on how to use this. 
-
-3. The `mimalloc-redirect.dll` must be put in the same folder as the main 
+
+3. The `mimalloc-redirect.dll` must be put in the same folder as the main 
    `mimalloc.dll` at runtime (as it is a dependency of that DLL).
    The redirection DLL ensures that all calls to the C runtime malloc API get 
    redirected to mimalloc functions (which reside in `mimalloc.dll`).
-
-4. Ensure the `mimalloc.dll` comes as early as possible in the import
+
+4. Ensure the `mimalloc.dll` comes as early as possible in the import
    list of the final executable (so it can intercept all potential allocations).
    You can use `minject -l <exe>` to check this if needed.
src/dashbls/depends/mimalloc/docs/group__malloc.html (1)

406-406: Plain HTTP doc links (very low priority, vendor-generated)

Static analysis flags a few outbound references that still use http:// (OpenBSD man pages and POSIX function docs). In this context they are just documentation links, so there is no practical security impact, but if those endpoints support HTTPS it would be cleaner to switch them to https:// to silence the warnings.

Given this file is generated from upstream mimalloc sources, any such change is best made upstream rather than patched locally in the vendored subtree.

Also applies to: 439-439, 479-479, 506-506, 538-538

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86e84d7 and 0ff505c.

⛔ Files ignored due to path filters (9)
  • src/dashbls/depends/mimalloc/bin/mimalloc-redirect-arm64.dll is excluded by !**/*.dll
  • src/dashbls/depends/mimalloc/bin/mimalloc-redirect-arm64ec.dll is excluded by !**/*.dll
  • src/dashbls/depends/mimalloc/bin/mimalloc-redirect.dll is excluded by !**/*.dll
  • src/dashbls/depends/mimalloc/bin/mimalloc-redirect32.dll is excluded by !**/*.dll
  • src/dashbls/depends/mimalloc/bin/minject-arm64.exe is excluded by !**/*.exe
  • src/dashbls/depends/mimalloc/bin/minject.exe is excluded by !**/*.exe
  • src/dashbls/depends/mimalloc/bin/minject32.exe is excluded by !**/*.exe
  • src/dashbls/depends/mimalloc/docs/doxygen.svg is excluded by !**/*.svg
  • src/dashbls/depends/mimalloc/docs/search/close.svg is excluded by !**/*.svg
📒 Files selected for processing (107)
  • src/dashbls/.github/workflows/build-binds.yml (2 hunks)
  • src/dashbls/.github/workflows/build-test.yaml (1 hunks)
  • src/dashbls/Makefile.mimalloc.include (2 hunks)
  • src/dashbls/configure.ac (1 hunks)
  • src/dashbls/depends/mimalloc/.gitignore (1 hunks)
  • src/dashbls/depends/mimalloc/CMakeLists.txt (10 hunks)
  • src/dashbls/depends/mimalloc/LICENSE (1 hunks)
  • src/dashbls/depends/mimalloc/SECURITY.md (1 hunks)
  • src/dashbls/depends/mimalloc/azure-pipelines.yml (8 hunks)
  • src/dashbls/depends/mimalloc/bin/readme.md (1 hunks)
  • src/dashbls/depends/mimalloc/cmake/mimalloc-config-version.cmake (1 hunks)
  • src/dashbls/depends/mimalloc/cmake/mimalloc-config.cmake (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/docker/alpine-arm32v7/Dockerfile (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/docker/alpine-x86/Dockerfile (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/docker/alpine/Dockerfile (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/docker/manylinux-x64/Dockerfile (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/docker/readme.md (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/vcpkg/portfile.cmake (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/vcpkg/readme.md (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/vcpkg/usage (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/vcpkg/vcpkg-cmake-wrapper.cmake (1 hunks)
  • src/dashbls/depends/mimalloc/contrib/vcpkg/vcpkg.json (1 hunks)
  • src/dashbls/depends/mimalloc/doc/doxyfile (55 hunks)
  • src/dashbls/depends/mimalloc/doc/mimalloc-doc.h (26 hunks)
  • src/dashbls/depends/mimalloc/doc/mimalloc-doxygen.css (1 hunks)
  • src/dashbls/depends/mimalloc/docs/annotated.html (5 hunks)
  • src/dashbls/depends/mimalloc/docs/bench.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/build.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/classes.html (5 hunks)
  • src/dashbls/depends/mimalloc/docs/clipboard.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/cookie.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/doxygen.css (41 hunks)
  • src/dashbls/depends/mimalloc/docs/dynsections.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/environment.html (5 hunks)
  • src/dashbls/depends/mimalloc/docs/functions.html (5 hunks)
  • src/dashbls/depends/mimalloc/docs/functions_vars.html (5 hunks)
  • src/dashbls/depends/mimalloc/docs/group__aligned.html (7 hunks)
  • src/dashbls/depends/mimalloc/docs/group__aligned.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__analysis.html (12 hunks)
  • src/dashbls/depends/mimalloc/docs/group__analysis.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__analysis_structmi__heap__area__t.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__cpp.html (7 hunks)
  • src/dashbls/depends/mimalloc/docs/group__cpp.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__extended.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__heap.html (11 hunks)
  • src/dashbls/depends/mimalloc/docs/group__heap.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__malloc.html (9 hunks)
  • src/dashbls/depends/mimalloc/docs/group__malloc.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__options.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/group__options.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__posix.html (8 hunks)
  • src/dashbls/depends/mimalloc/docs/group__posix.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/group__typed.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/group__zeroinit.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/group__zeroinit.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/index.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/mimalloc-doxygen.css (1 hunks)
  • src/dashbls/depends/mimalloc/docs/modules.html (3 hunks)
  • src/dashbls/depends/mimalloc/docs/navtree.css (3 hunks)
  • src/dashbls/depends/mimalloc/docs/navtree.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/navtreedata.js (2 hunks)
  • src/dashbls/depends/mimalloc/docs/navtreeindex0.js (2 hunks)
  • src/dashbls/depends/mimalloc/docs/overrides.html (7 hunks)
  • src/dashbls/depends/mimalloc/docs/pages.html (6 hunks)
  • src/dashbls/depends/mimalloc/docs/resize.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_1.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_10.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_2.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_3.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_4.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_5.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_6.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_7.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_8.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_9.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_a.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_b.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_c.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_d.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_e.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/all_f.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/classes_0.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/enums_0.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/enumvalues_0.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/enumvalues_1.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/functions_0.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_0.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_1.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_2.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_3.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_4.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_5.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_6.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_7.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_8.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_9.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_a.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_b.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_c.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/groups_d.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_0.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_1.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_2.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_3.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_4.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_5.js (1 hunks)
  • src/dashbls/depends/mimalloc/docs/search/pages_6.js (1 hunks)
⛔ Files not processed due to max files limit (15)
  • src/dashbls/depends/mimalloc/docs/search/pages_7.js
  • src/dashbls/depends/mimalloc/docs/search/search.css
  • src/dashbls/depends/mimalloc/docs/search/search.js
  • src/dashbls/depends/mimalloc/docs/search/searchdata.js
  • src/dashbls/depends/mimalloc/docs/search/typedefs_0.js
  • src/dashbls/depends/mimalloc/docs/search/variables_0.js
  • src/dashbls/depends/mimalloc/docs/search/variables_1.js
  • src/dashbls/depends/mimalloc/docs/search/variables_2.js
  • src/dashbls/depends/mimalloc/docs/search/variables_3.js
  • src/dashbls/depends/mimalloc/docs/search/variables_4.js
  • src/dashbls/depends/mimalloc/docs/tabs.css
  • src/dashbls/depends/mimalloc/docs/topics.js
  • src/dashbls/depends/mimalloc/docs/using.html
  • src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj
  • src/dashbls/depends/mimalloc/ide/vs2017/mimalloc-override-test.vcxproj.filters
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: kwvg
Repo: dashpay/dash PR: 6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.
Learnt from: kwvg
Repo: dashpay/dash PR: 6838
File: src/governance/signing.cpp:232-242
Timestamp: 2025-10-03T11:30:10.766Z
Learning: The Dash codebase dropped C++17 support in PR #6380 and now requires C++20 or later, as configured in configure.ac. C++20 features, including std::ranges algorithms like std::ranges::any_of, are appropriate and preferred where they improve code clarity.
📚 Learning: 2025-08-11T17:16:36.654Z
Learnt from: PastaPastaPasta
Repo: dashpay/dash PR: 6804
File: src/qt/proposalwizard.cpp:40-42
Timestamp: 2025-08-11T17:16:36.654Z
Learning: In the Dash repository, when a PR adds new files that are not from Bitcoin backports, these files must be added to the list in test/util/data/non-backported.txt. This applies to newly created files like qt/proposalwizard.{h,cpp} and forms/proposalwizard.ui. Limited exemptions may exist for subtrees and similar cases.

Applied to files:

  • src/dashbls/depends/mimalloc/.gitignore
📚 Learning: 2025-02-19T00:03:39.001Z
Learnt from: PastaPastaPasta
Repo: dashpay/dash PR: 6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:39.001Z
Learning: GitHub Actions supports ARM64 runners with the label `ubuntu-22.04-arm` for public repositories, introduced in January 2025. This runner is specifically designed for ARM64 architecture builds.

Applied to files:

  • src/dashbls/depends/mimalloc/azure-pipelines.yml
📚 Learning: 2025-02-19T00:03:39.002Z
Learnt from: PastaPastaPasta
Repo: dashpay/dash PR: 6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:39.002Z
Learning: GitHub Actions supports ARM64 runners with the labels `ubuntu-latest-arm64` and `linux-arm64` for public repositories, introduced in January 2025. These runners are specifically designed for ARM64 architecture builds.

Applied to files:

  • src/dashbls/depends/mimalloc/azure-pipelines.yml
📚 Learning: 2025-07-23T09:30:34.631Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6761
File: src/chainlock/signing.h:5-6
Timestamp: 2025-07-23T09:30:34.631Z
Learning: Dash Core uses BITCOIN_ prefix for header guards as the standard convention, inherited from Bitcoin Core. Only a few BLS-specific files in src/bls/ use DASH_ prefix. The vast majority of files (385+) use BITCOIN_ prefix.

Applied to files:

  • src/dashbls/Makefile.mimalloc.include
🪛 ast-grep (0.40.0)
src/dashbls/depends/mimalloc/docs/group__malloc.html

[warning] 406-406: "This link points to a plaintext HTTP URL. Prefer an encrypted HTTPS URL if possible."
Context: reallocarray()
Note: [CWE-319] Authentication Bypass by Primary Weakness [REFERENCES]
- https://cwe.mitre.org/data/definitions/319.html

(plaintext-http-link-html)


[warning] 439-439: "This link points to a plaintext HTTP URL. Prefer an encrypted HTTPS URL if possible."
Context: realpath()
Note: [CWE-319] Authentication Bypass by Primary Weakness [REFERENCES]
- https://cwe.mitre.org/data/definitions/319.html

(plaintext-http-link-html)


[warning] 479-479: "This link points to a plaintext HTTP URL. Prefer an encrypted HTTPS URL if possible."
Context: recallocarray()
Note: [CWE-319] Authentication Bypass by Primary Weakness [REFERENCES]
- https://cwe.mitre.org/data/definitions/319.html

(plaintext-http-link-html)


[warning] 506-506: "This link points to a plaintext HTTP URL. Prefer an encrypted HTTPS URL if possible."
Context: strdup()
Note: [CWE-319] Authentication Bypass by Primary Weakness [REFERENCES]
- https://cwe.mitre.org/data/definitions/319.html

(plaintext-http-link-html)


[warning] 538-538: "This link points to a plaintext HTTP URL. Prefer an encrypted HTTPS URL if possible."
Context: strndup()
Note: [CWE-319] Authentication Bypass by Primary Weakness [REFERENCES]
- https://cwe.mitre.org/data/definitions/319.html

(plaintext-http-link-html)

🪛 LanguageTool
src/dashbls/depends/mimalloc/bin/readme.md

[grammar] ~6-~6: Use a hyphen to join words.
Context: ...on large programs that include other 3rd party components. There are four require...

(QB_NEW_EN_HYPHEN)


[grammar] ~77-~77: Ensure spelling is correct
Context: ...oft.com/en-us/windows/arm/arm64ec ### Minject We cannot always re-link an executable w...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.18.1)
src/dashbls/depends/mimalloc/bin/readme.md

21-21: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


22-22: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


23-23: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


24-24: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


25-25: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


26-26: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


27-27: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)

src/dashbls/depends/mimalloc/SECURITY.md

21-21: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


22-22: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


23-23: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


24-24: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


25-25: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


26-26: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


27-27: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)

*.tar
*.gz
.vscode
.DS_STore
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix typo in macOS gitignore pattern.

Line 13 has a capitalization error: .DS_STore should be .DS_Store (lowercase 't' and 'ore'). The current pattern will not catch macOS-generated .DS_Store files.

-.DS_STore
+.DS_Store
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.DS_STore
.DS_Store
🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/.gitignore around line 13, the macOS ignore
pattern is misspelled as `.DS_STore`; replace it with the correct `.DS_Store`
(capital D and S, lowercase 'Store') so the .gitignore will match
macOS-generated .DS_Store files.

<span id="override_on_windows">We use a separate redirection DLL to override mimalloc on Windows</span>
such that we redirect all malloc/free calls that go through the (dynamic) C runtime allocator,
including those from other DLL's or libraries. As it intercepts all allocation calls on a low level,
it can be used on large programs that include other 3rd party components.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix hyphenation in compound adjective.

"3rd party" should be hyphenated as "3rd-party" when used as a compound adjective modifying "components."

-on large programs that include other 3rd party components.
+on large programs that include other 3rd-party components.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it can be used on large programs that include other 3rd party components.
it can be used on large programs that include other 3rd-party components.
🧰 Tools
🪛 LanguageTool

[grammar] ~6-~6: Use a hyphen to join words.
Context: ...on large programs that include other 3rd party components. There are four require...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/bin/readme.md around line 6, the phrase "3rd
party components" is used as a compound adjective and should be hyphenated;
update the text to "3rd-party components" so the compound adjective correctly
modifies "components" and maintains consistent hyphenation.

@@ -1,82 +1,184 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.18)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Confirm CMake ≥ 3.18 in all Dash build environments

Raising cmake_minimum_required to 3.18 to use CheckLinkerFlag is reasonable, but it will hard‑fail any environment that only has older CMake (including custom builders using the depends tree directly). Please confirm CI images and supported user toolchains ship CMake 3.18+ so this subtree bump doesn’t introduce unexpected build breakage.

Also applies to: 51-51






🏁 Script executed:

#!/bin/bash
# Find CI configuration files to see what CMake versions are tested
find . -type f \( -name "*.yml" -o -name "*.yaml" -o -name ".travis*" -o -name "appveyor*" \) | head -20

Length of output: 777


🏁 Script executed:

#!/bin/bash
# Check for CMake version requirements in main configure.ac and root level configs
fd -e "ac$" -e "cmake$" -e "CMakeLists.txt" . | grep -E "(configure|CMakeLists)" | head -20

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Look for existing CMake minimum version declarations in the repo
rg -n "cmake_minimum_required" --type cmake -C 2

Length of output: 2410


🏁 Script executed:

#!/bin/bash
# Check the dashbls subtree context - is it independent or part of main build?
cat src/dashbls/depends/mimalloc/CMakeLists.txt | head -60

Length of output: 4163


🏁 Script executed:

#!/bin/bash
# Look for CheckLinkerFlag usage in the file to understand why 3.18 is needed
rg -n "CheckLinkerFlag" src/dashbls/depends/mimalloc/CMakeLists.txt -C 3

Length of output: 419


🏁 Script executed:

#!/bin/bash
# Check if there's a parent CMakeLists.txt that might set minimum version
find . -name "CMakeLists.txt" -type f | grep -E "(dashbls|depends)" | head -10

Length of output: 512


🌐 Web query:

CMake CheckLinkerFlag when introduced which version

💡 Result:

CheckLinkerFlag was introduced in CMake 3.18. [1][2]

Sources:
[1] CMake module docs (CheckLinkerFlag) — New in version 3.18.
[2] CMake 3.18 release notes — "The CheckLinkerFlag module has been added."



---

🏁 Script executed:

```shell
#!/bin/bash
# Check main dashbls CMakeLists.txt minimum version
head -20 src/dashbls/CMakeLists.txt

Length of output: 554


🏁 Script executed:

#!/bin/bash
# Check CI workflows for CMake availability - examine key build workflows
grep -n "cmake" .github/workflows/build-src.yml -i | head -30

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check the build-depends workflow as well
grep -n "cmake" .github/workflows/build-depends.yml -i | head -30

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check what container/image is used in builds
grep -n "ubuntu\|cmake\|version" .github/workflows/build.yml -i | head -40

Length of output: 29


🏁 Script executed:

#!/bin/bash
# Look for any CMake version specification in CI files
rg -n "cmake.*3\.\d+" .github/workflows/ -C 2

Length of output: 0






🏁 Script executed:

#!/bin/bash
# Check if dashbls includes its depends subdirectories
rg -n "add_subdirectory.*depends|add_subdirectory.*mimalloc|add_subdirectory.*relic" src/dashbls/CMakeLists.txt -C 3

Length of output: 261


🏁 Script executed:

#!/bin/bash
# Search more broadly for how depends are included
cat src/dashbls/CMakeLists.txt | grep -n "add_subdirectory\|include" | head -20

Length of output: 594


🏁 Script executed:

#!/bin/bash
# Check entire dashbls CMakeLists.txt structure
wc -l src/dashbls/CMakeLists.txt && echo "---" && cat src/dashbls/CMakeLists.txt

Length of output: 4375


🏁 Script executed:

#!/bin/bash
# Check what Ubuntu image version is used and infer CMake version
cat .github/workflows/build.yml | head -50

Length of output: 1514


🌐 Web query:

ubuntu-latest CMake version 2025

💡 Result:

Short answer: ubuntu-latest (Ubuntu 24.04 on GitHub Actions) uses the current CMake 4.x release as of September 2025 (images were updated to the latest CMake in the Sept 2025 rollout). [1][2]

Sources:

  • actions/runner-images issue announcing CMake upgrade to latest (target Sept 15, 2025). [1]
  • actions/runner-images Ubuntu 24.04 image release notes (ubuntu24 image used by ubuntu-latest). [2]

Update dashbls parent CMakeLists.txt to require CMake 3.18, matching its dependencies

The 3.18 requirement in dashbls/depends/mimalloc/CMakeLists.txt and relic/CMakeLists.txt is justified—CheckLinkerFlag requires CMake 3.18. However, there's a critical oversight: src/dashbls/CMakeLists.txt declares CMAKE_MINIMUM_REQUIRED(VERSION 3.14.0) but unconditionally includes both depends/relic and depends/mimalloc (lines 111–112). In CMake, a child's cmake_minimum_required() raises the effective minimum for the entire build. This creates a hidden requirement: the actual minimum is 3.18, not 3.14.0 as advertised.

Required change: Update src/dashbls/CMakeLists.txt line 1 to:

CMAKE_MINIMUM_REQUIRED(VERSION 3.18.0 FATAL_ERROR)

This ensures the version contract is explicit and correct. CI (ubuntu-latest with CMake 4.x) will not break, but custom builders using the dashbls subtree will fail silently with CMake 3.14–3.17 unless the parent version is fixed.

🤖 Prompt for AI Agents
In src/dashbls/CMakeLists.txt at line 1, the declared minimum CMake version is
3.14.0 but the project unconditionally includes depends/relic and
depends/mimalloc which require CMake 3.18; update the top-level
CMAKE_MINIMUM_REQUIRED declaration from 3.14.0 to require 3.18.0 and add
FATAL_ERROR so the effective minimum is explicit (i.e., change the first line to
require VERSION 3.18.0 FATAL_ERROR).

Comment on lines +124 to +145
# Determine architecture
set(MI_OPT_ARCH_FLAGS "")
set(MI_ARCH "unknown")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86|i[3456]86)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "^(x86|Win32)$")
set(MI_ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64" OR "x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) # must be before arm64
set(MI_ARCH "x64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv[89].?|ARM64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64" OR "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
set(MI_ARCH "arm64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|armv[34567].?|ARM)$")
set(MI_ARCH "arm32")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$")
if(CMAKE_SIZEOF_VOID_P==4)
set(MI_ARCH "riscv32")
else()
set(MI_ARCH "riscv64")
endif()
else()
set(MI_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
message(STATUS "Architecture: ${MI_ARCH}") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})")

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

❓ Verification inconclusive

RISC‑V architecture detection likely misuses CMAKE_SIZEOF_VOID_P comparison

At Line 136, the condition:

if(CMAKE_SIZEOF_VOID_P==4)

is written without spaces or an explicit comparison operator (EQUAL), which may not be parsed as a numeric comparison by CMake and can behave differently than intended. That risks always selecting riscv32 whenever the RISC‑V branch matches, even on 64‑bit configurations.

Safer and idiomatic CMake would be:

-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$")
-  if(CMAKE_SIZEOF_VOID_P==4)
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$")
+  if(CMAKE_SIZEOF_VOID_P EQUAL 4)
     set(MI_ARCH "riscv32")
   else()
     set(MI_ARCH "riscv64")
   endif()

This makes the pointer-size split explicit and avoids depending on ambiguous parsing.


I'll verify the CMake syntax concerns raised in this review comment.

Now let me verify the actual code in the CMakeLists.txt file to confirm the issue.

Based on my verification of CMake documentation and syntax analysis, the review comment is valid and identifies a genuine issue. CMake's if() command supports binary comparison operators such as EQUAL, but EQUAL is for numeric comparisons, while STREQUAL is for string comparisons. The syntax CMAKE_SIZEOF_VOID_P==4 without spaces is not a recognized CMake operator; CMake does not support the == operator for if() conditions. This would be parsed as a string literal rather than a numeric comparison, which would evaluate to false and cause the RISC-V architecture detection to fail or behave unexpectedly. The correct idiomatic CMake syntax is if(CMAKE_SIZEOF_VOID_P EQUAL 4).


Use CMAKE_SIZEOF_VOID_P EQUAL 4 instead of CMAKE_SIZEOF_VOID_P==4 at line 136

CMake's EQUAL operator is for numeric comparisons, and the == operator is not valid in CMake if() conditions. The current syntax would not perform a numeric comparison and risks always selecting the else branch (riscv64) regardless of actual pointer size.

 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$")
-  if(CMAKE_SIZEOF_VOID_P==4)
+  if(CMAKE_SIZEOF_VOID_P EQUAL 4)
     set(MI_ARCH "riscv32")
   else()
     set(MI_ARCH "riscv64")
   endif()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Determine architecture
set(MI_OPT_ARCH_FLAGS "")
set(MI_ARCH "unknown")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86|i[3456]86)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "^(x86|Win32)$")
set(MI_ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64" OR "x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) # must be before arm64
set(MI_ARCH "x64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv[89].?|ARM64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64" OR "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
set(MI_ARCH "arm64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|armv[34567].?|ARM)$")
set(MI_ARCH "arm32")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$")
if(CMAKE_SIZEOF_VOID_P==4)
set(MI_ARCH "riscv32")
else()
set(MI_ARCH "riscv64")
endif()
else()
set(MI_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
message(STATUS "Architecture: ${MI_ARCH}") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})")
# Determine architecture
set(MI_OPT_ARCH_FLAGS "")
set(MI_ARCH "unknown")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86|i[3456]86)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "^(x86|Win32)$")
set(MI_ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64" OR "x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES) # must be before arm64
set(MI_ARCH "x64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv[89].?|ARM64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64" OR "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
set(MI_ARCH "arm64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|armv[34567].?|ARM)$")
set(MI_ARCH "arm32")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv|riscv32|riscv64)$")
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(MI_ARCH "riscv32")
else()
set(MI_ARCH "riscv64")
endif()
else()
set(MI_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
message(STATUS "Architecture: ${MI_ARCH}") # (${CMAKE_SYSTEM_PROCESSOR}, ${CMAKE_GENERATOR_PLATFORM}, ${CMAKE_GENERATOR})")
🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/CMakeLists.txt lines 124-145, the RISC-V
pointer-size check uses invalid CMake syntax "CMAKE_SIZEOF_VOID_P==4"; replace
this with the proper numeric comparison form "CMAKE_SIZEOF_VOID_P EQUAL 4" so
the if() evaluates correctly and selects riscv32 when pointers are 4 bytes
(otherwise riscv64).

Comment on lines +489 to +507
# we prefer -l<lib> test over `find_library` as sometimes core libraries
# like `libatomic` are not on the system path (see issue #898)
function(find_link_library libname outlibname)
check_linker_flag(C "-l${libname}" mi_has_lib${libname})
if (mi_has_lib${libname})
message(VERBOSE "link library: -l${libname}")
set(${outlibname} ${libname} PARENT_SCOPE)
else()
find_library(MI_LIBPATH libname)
if (MI_LIBPATH)
message(VERBOSE "link library ${libname} at ${MI_LIBPATH}")
set(${outlibname} ${MI_LIBPATH} PARENT_SCOPE)
else()
message(VERBOSE "link library not found: ${libname}")
set(${outlibname} "" PARENT_SCOPE)
endif()
endif()
endfunction()

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

find_link_library fallback uses literal libname instead of the argument value

In find_link_library:

function(find_link_library libname outlibname)
  check_linker_flag(C "-l${libname}" mi_has_lib${libname})
  if (mi_has_lib${libname})
    ...
  else()
    find_library(MI_LIBPATH libname)
    ...
  endif()
endfunction()

check_linker_flag correctly uses ${libname}, but the fallback call find_library(MI_LIBPATH libname) searches for a library literally named libname, not for the argument value (e.g. "pthread", "rt", "atomic"). That means the fallback can never succeed for those cases, and MI_LIB_* may remain empty even when the library exists off the default link path.

This should use the parameter value:

-  else()
-    find_library(MI_LIBPATH libname)
+  else()
+    find_library(MI_LIBPATH ${libname})

Given this helper is immediately used for "pthread", "rt", and "atomic", fixing it will make the fallback actually do what the comment describes. If this file is meant to track upstream mimalloc exactly, you may want to also push this patch upstream and then re‑sync. Based on learnings.

Also applies to: 511-523


I'll verify the review comment by inspecting the actual CMakeLists.txt file and checking the context around the identified lines.


🏁 Script executed:

#!/bin/bash
# Check the exact content of the CMakeLists.txt file around the identified lines
if [ -f "src/dashbls/depends/mimalloc/CMakeLists.txt" ]; then
  echo "=== Lines 489-510 (find_link_library function) ==="
  sed -n '489,510p' "src/dashbls/depends/mimalloc/CMakeLists.txt"
  echo ""
  echo "=== Lines 511-525 (also applies section) ==="
  sed -n '511,525p' "src/dashbls/depends/mimalloc/CMakeLists.txt"
else
  echo "File not found at expected path"
  find . -name "CMakeLists.txt" -path "*/mimalloc/*" 2>/dev/null | head -5
fi

Length of output: 1245


🏁 Script executed:

#!/bin/bash
# Search for other uses of find_library in the mimalloc CMakeLists.txt to understand pattern
if [ -f "src/dashbls/depends/mimalloc/CMakeLists.txt" ]; then
  echo "=== All find_library calls in the file ==="
  grep -n "find_library" "src/dashbls/depends/mimalloc/CMakeLists.txt"
  echo ""
  echo "=== Context around check_linker_flag calls ==="
  grep -n "check_linker_flag" "src/dashbls/depends/mimalloc/CMakeLists.txt"
fi

Length of output: 271


🏁 Script executed:

#!/bin/bash
# Check if there are comments about upstream tracking or mimalloc version
if [ -f "src/dashbls/depends/mimalloc/CMakeLists.txt" ]; then
  echo "=== File header/comments ==="
  head -30 "src/dashbls/depends/mimalloc/CMakeLists.txt"
fi

Length of output: 2543


Fix the find_library call to use the function parameter instead of literal "libname"

The bug is confirmed. At line 497, find_library(MI_LIBPATH libname) searches for a library literally named libname, not the parameter value. This breaks the fallback for pthread, rt, and atomic libraries when they're off the default system path, contradicting the stated purpose in the comment.

-    find_library(MI_LIBPATH libname)
+    find_library(MI_LIBPATH ${libname})
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# we prefer -l<lib> test over `find_library` as sometimes core libraries
# like `libatomic` are not on the system path (see issue #898)
function(find_link_library libname outlibname)
check_linker_flag(C "-l${libname}" mi_has_lib${libname})
if (mi_has_lib${libname})
message(VERBOSE "link library: -l${libname}")
set(${outlibname} ${libname} PARENT_SCOPE)
else()
find_library(MI_LIBPATH libname)
if (MI_LIBPATH)
message(VERBOSE "link library ${libname} at ${MI_LIBPATH}")
set(${outlibname} ${MI_LIBPATH} PARENT_SCOPE)
else()
message(VERBOSE "link library not found: ${libname}")
set(${outlibname} "" PARENT_SCOPE)
endif()
endif()
endfunction()
# we prefer -l<lib> test over `find_library` as sometimes core libraries
# like `libatomic` are not on the system path (see issue #898)
function(find_link_library libname outlibname)
check_linker_flag(C "-l${libname}" mi_has_lib${libname})
if (mi_has_lib${libname})
message(VERBOSE "link library: -l${libname}")
set(${outlibname} ${libname} PARENT_SCOPE)
else()
find_library(MI_LIBPATH ${libname})
if (MI_LIBPATH)
message(VERBOSE "link library ${libname} at ${MI_LIBPATH}")
set(${outlibname} ${MI_LIBPATH} PARENT_SCOPE)
else()
message(VERBOSE "link library not found: ${libname}")
set(${outlibname} "" PARENT_SCOPE)
endif()
endif()
endfunction()
🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/CMakeLists.txt around lines 489-507, the
fallback find_library call incorrectly passes the literal token "libname"
instead of the function parameter; change the call to pass the variable (e.g.
find_library(MI_LIBPATH ${libname})) so CMake searches for the actual requested
library name, keep the rest of the logic unchanged so MI_LIBPATH is used as the
found path and propagated to outlibname.

Comment on lines +1 to +28
# install from an image
# download first an appropriate tar.gz image into the current directory
# from <https://github.com/alpinelinux/docker-alpine/tree/edge/x86>
FROM scratch

# Substitute the image name that was downloaded
ADD alpine-minirootfs-20250108-x86.tar.gz /

# Install tools
RUN apk add build-base make cmake
RUN apk add git
RUN apk add vim

RUN mkdir -p /home/dev
WORKDIR /home/dev

# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug

# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
# RUN make -j
# RUN make test

CMD ["/bin/sh"]
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Inconsistent build configuration and incomplete setup.

Several issues across the Dockerfile group need attention:

  1. Lines 25–26 (commented-out build & test steps): This Dockerfile has the build and test steps commented out, while the alpine/ and alpine-arm32v7/ variants have them enabled. Clarify the intent: if the image is meant to support building, these should be active; if debug setup only, document the reason.

  2. Line 18 (missing commit checkout): The git clone uses dev2 branch but doesn't checkout the specific commit mentioned in the PR (6169ee9c). Add RUN git -C mimalloc checkout 6169ee9c to ensure reproducible builds.

  3. Line 7 (tarball dependency): The ADD command requires alpine-minirootfs-20250108-x86.tar.gz in the build context. Verify this file is available and tracked; otherwise, the build will fail.

  4. Lines 10–12 (inefficient layering): Combine the three separate apk add commands into a single RUN statement to reduce image layers and improve build efficiency.

  5. Security (no USER directive): All containers run as root. Consider adding USER dev at the end for better security hygiene.

Apply this diff to improve consistency and efficiency:

-RUN apk add build-base make cmake
-RUN apk add git
-RUN apk add vim
+RUN apk add build-base make cmake git vim

 RUN mkdir -p  /home/dev
 WORKDIR /home/dev

 # Get mimalloc
-RUN git clone https://github.com/microsoft/mimalloc -b dev2
+RUN git clone https://github.com/microsoft/mimalloc -b dev2 && \
+    git -C mimalloc checkout 6169ee9c

 RUN mkdir -p mimalloc/out/release
 RUN mkdir -p mimalloc/out/debug

 # Build mimalloc debug
 WORKDIR /home/dev/mimalloc/out/debug
 RUN cmake ../.. -DMI_DEBUG_FULL=ON
-# RUN make -j
-# RUN make test
+RUN make -j
+RUN make test

+USER dev
 CMD ["/bin/sh"]

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/contrib/docker/alpine-x86/Dockerfile lines 1-28:
enable or document the intended build behavior (either uncomment and run the
make and test steps for a full build like the other variants, or add a comment
explaining this is a debug-only image), ensure reproducible checkout by running
git -C mimalloc checkout 6169ee9c after cloning, verify the ADD tarball
alpine-minirootfs-20250108-x86.tar.gz is present in the build context or update
the Dockerfile to fetch it otherwise, merge the three apk add invocations into a
single RUN apk add --no-cache ... to reduce layers, and create and switch to a
non-root user (e.g., add commands to create user dev, chown /home/dev and add
USER dev at the end) for improved security.

Comment on lines +1 to +23
# alpine image
FROM alpine

# Install tools
RUN apk add build-base make cmake
RUN apk add git
RUN apk add vim

RUN mkdir -p /home/dev
WORKDIR /home/dev

# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug

# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test

CMD ["/bin/sh"] No newline at end of file
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing commit checkout and inefficient layer creation.

  1. Line 13 (missing commit checkout): Same as alpine-x86—add explicit checkout to commit 6169ee9c for reproducible builds:

    -RUN git clone https://github.com/microsoft/mimalloc -b dev2
    +RUN git clone https://github.com/microsoft/mimalloc -b dev2 && \
    +    git -C mimalloc checkout 6169ee9c
  2. Lines 5–7 (inefficient layering): Combine into a single RUN statement:

    -RUN apk add build-base make cmake
    -RUN apk add git
    -RUN apk add vim
    +RUN apk add build-base make cmake git vim
  3. Security: Add USER dev before the CMD to avoid running as root.

Comment on lines +1 to +23
FROM quay.io/pypa/manylinux2014_x86_64

# Install tools
RUN yum install -y openssl-devel
RUN yum install -y gcc gcc-c++ kernel-devel make
RUN yum install -y git cmake
RUN yum install -y vim

RUN mkdir -p /home/dev
WORKDIR /home/dev

# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug

# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test

CMD ["/bin/sh"] No newline at end of file
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Missing commit checkout and inefficient package installation.

  1. Line 13 (missing commit checkout): Add explicit checkout to commit 6169ee9c:

    -RUN git clone https://github.com/microsoft/mimalloc -b dev2
    +RUN git clone https://github.com/microsoft/mimalloc -b dev2 && \
    +    git -C mimalloc checkout 6169ee9c
  2. Lines 4–7 (inefficient layering): Consolidate yum install commands:

    -RUN yum install -y openssl-devel
    -RUN yum install -y gcc gcc-c++ kernel-devel make
    -RUN yum install -y git cmake
    -RUN yum install -y vim
    +RUN yum install -y openssl-devel gcc gcc-c++ kernel-devel make git cmake vim
  3. Security: Add USER dev before the CMD.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM quay.io/pypa/manylinux2014_x86_64
# Install tools
RUN yum install -y openssl-devel
RUN yum install -y gcc gcc-c++ kernel-devel make
RUN yum install -y git cmake
RUN yum install -y vim
RUN mkdir -p /home/dev
WORKDIR /home/dev
# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug
# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test
CMD ["/bin/sh"]
FROM quay.io/pypa/manylinux2014_x86_64
# Install tools
RUN yum install -y openssl-devel gcc gcc-c++ kernel-devel make git cmake vim
RUN mkdir -p /home/dev
WORKDIR /home/dev
# Get mimalloc
RUN git clone https://github.com/microsoft/mimalloc -b dev2 && \
git -C mimalloc checkout 6169ee9c
RUN mkdir -p mimalloc/out/release
RUN mkdir -p mimalloc/out/debug
# Build mimalloc debug
WORKDIR /home/dev/mimalloc/out/debug
RUN cmake ../.. -DMI_DEBUG_FULL=ON
RUN make -j
RUN make test
CMD ["/bin/sh"]
🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/contrib/docker/manylinux-x64/Dockerfile lines
1–23: the Dockerfile must checkout the exact mimalloc commit, reduce multiple
yum layers, and run as a non-root user; after cloning run git checkout 6169ee9c
to pin the dev2 tree to that commit, replace the separate yum install RUNs with
a single RUN yum install -y openssl-devel gcc gcc-c++ kernel-devel make git
cmake vim && yum clean all && rm -rf /var/cache/yum to minimize layers and image
size, create a non-root user (eg. mkdir -p /home/dev; useradd -m dev || adduser
-D dev), chown the workspace to that user and add USER dev before CMD, and keep
existing WORKDIR and build steps but ensure permissions allow the non-root
build.

Comment on lines +30 to +124
let dynsection = {

// helper function
updateStripes : function() {
$('table.directory tr').
removeClass('even').filter(':visible:even').addClass('even');
$('table.directory tr').
removeClass('odd').filter(':visible:odd').addClass('odd');
},

toggleVisibility : function(linkObj) {
const base = $(linkObj).attr('id');
const summary = $('#'+base+'-summary');
const content = $('#'+base+'-content');
const trigger = $('#'+base+'-trigger');
const src=$(trigger).attr('src');
if (content.is(':visible')===true) {
content.hide();
summary.show();
$(linkObj).addClass('closed').removeClass('opened');
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
$(this).hide();
content.show();
summary.hide();
$(linkObj).removeClass('closed').addClass('opened');
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
}
});
updateStripes();
}
return false;
},

function toggleFolder(id)
{
// the clicked row
var currentRow = $('#row_'+id);

// all rows after the clicked row
var rows = currentRow.nextAll("tr");

var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub

// only match elements AFTER this one (can't hide elements before)
var childRows = rows.filter(function() { return this.id.match(re); });

// first row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
// replace down arrow by right arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
currentRowSpans.filter(".arrow").html('&#9658;');
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
} else { // we are SHOWING
// replace right arrow by down arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
currentRowSpans.filter(".arrow").html('&#9660;');
// replace down arrows by right arrows for child rows
var childRowsSpans = childRows.find("span");
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
childRowsSpans.filter(".arrow").html('&#9658;');
childRows.show(); //show all children
}
updateStripes();
}
toggleLevel : function(level) {
$('table.directory tr').each(function() {
const l = this.id.split('_').length-1;
const i = $('#img'+this.id.substring(3));
const a = $('#arr'+this.id.substring(3));
if (l<level+1) {
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
a.html('&#9660;');
$(this).show();
} else if (l==level+1) {
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
a.html('&#9658;');
$(this).show();
} else {
$(this).hide();
}
});
this.updateStripes();
},

toggleFolder : function(id) {
// the clicked row
const currentRow = $('#row_'+id);

function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
var img = $('tr.inherit_header.'+id+' img');
var src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
}
// all rows after the clicked row
const rows = currentRow.nextAll("tr");

const re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub

// only match elements AFTER this one (can't hide elements before)
const childRows = rows.filter(function() { return this.id.match(re); });

// first row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
// replace down arrow by right arrow for current row
const currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
currentRowSpans.filter(".arrow").html('&#9658;');
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
} else { // we are SHOWING
// replace right arrow by down arrow for current row
const currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
currentRowSpans.filter(".arrow").html('&#9660;');
// replace down arrows by right arrows for child rows
const childRowsSpans = childRows.find("span");
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
childRowsSpans.filter(".arrow").html('&#9658;');
childRows.show(); //show all children
}
this.updateStripes();
},

toggleInherit : function(id) {
const rows = $('tr.inherit.'+id);
const img = $('tr.inherit_header.'+id+' img');
const src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

dynsection object structure and DOM logic look consistent with Doxygen’s expectations

The refactor into a dynsection object (updateStripes, toggleVisibility, toggleLevel, toggleFolder, toggleInherit) is internally consistent:

  • this.updateStripes() is only called from within dynsection methods, so this correctly refers to dynsection.
  • The directory/tree toggling (toggleLevel / toggleFolder) uses coherent ID and class conventions (row_…, #img…, #arr…) and updates arrow icons and visibility in lockstep.
  • Inheritance toggling (toggleInherit) correctly pairs tr.inherit.* rows with tr.inherit_header.* img and switches icon sources without touching anything else.

Given this is vendored Doxygen/mimalloc documentation code, it’s good that the file appears unchanged in style and structure from upstream; I would avoid local “cleanup” here to keep future subtree bumps straightforward. As a sanity check, you may want to quickly verify that the generated HTML now calls dynsection.toggleLevel/toggleFolder/toggleInherit (rather than the old globals) by searching under the docs subtree.


🏁 Script executed:

#!/bin/bash
# Quick check that HTML uses the new dynsection API in the mimalloc docs
rg -n "dynsection\.toggle(Level|Folder|Inherit)\(" src/dashbls/depends/mimalloc/docs -S || \
  rg -n "toggle(Level|Folder|Inherit)\(" src/dashbls/depends/mimalloc/docs -S

Length of output: 0


🏁 Script executed:

#!/bin/bash
# First, check if the directory exists and what's in it
echo "=== Checking mimalloc docs directory structure ==="
find src/dashbls/depends/mimalloc/docs -type f -name "*.html" -o -name "*.js" 2>/dev/null | head -20

echo ""
echo "=== Checking if dynsections.js file exists ==="
find . -name "dynsections.js" 2>/dev/null

echo ""
echo "=== Checking dynsections.js for dynsection object definition ==="
grep -n "dynsection\s*=" src/dashbls/depends/mimalloc/docs/dynsections.js 2>/dev/null || echo "Pattern not found in expected location"

echo ""
echo "=== Searching for dynsection references in all JS files ==="
find src/dashbls/depends/mimalloc/docs -name "*.js" -exec grep -l "dynsection" {} \;

echo ""
echo "=== Searching for toggleLevel, toggleFolder, toggleInherit calls in HTML ==="
find src/dashbls/depends/mimalloc/docs -name "*.html" -exec grep -n "toggle\(Level\|Folder\|Inherit\)" {} + 2>/dev/null | head -10

Length of output: 1459


🏁 Script executed:

#!/bin/bash
# Check how dynsection methods might be called in generated HTML
echo "=== Searching for onclick handlers or data attributes that might call dynsection ==="
find src/dashbls/depends/mimalloc/docs -name "*.html" -exec grep -n "dynsection\|toggleLevel\|toggleFolder\|toggleInherit" {} + 2>/dev/null | head -20

Length of output: 2409


🏁 Script executed:

#!/bin/bash
# Check if dynsections.js is included/exported properly
echo "=== Checking for global exports or window object assignments in dynsections.js ==="
tail -20 src/dashbls/depends/mimalloc/docs/dynsections.js 2>/dev/null || echo "File not found"

Length of output: 1055


🏁 Script executed:

#!/bin/bash
# Check actual onclick handlers in one HTML file to see what they're calling
echo "=== Sample of onclick handlers from annotated.html ==="
grep -n "onclick\|on-click" src/dashbls/depends/mimalloc/docs/annotated.html 2>/dev/null | head -20

echo ""
echo "=== Checking for dynsection method calls in onclick ==="
grep -n "dynsection\.\|toggleLevel\|toggleFolder\|toggleInherit" src/dashbls/depends/mimalloc/docs/annotated.html 2>/dev/null

Length of output: 111


🏁 Script executed:

#!/bin/bash
# Check the complete dynsections.js file for window export or global assignment
echo "=== Last 50 lines of dynsections.js ==="
tail -50 src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== Searching for window.dynsection or global export ==="
grep -n "window\.dynsection\|^dynsection\s*=" src/dashbls/depends/mimalloc/docs/dynsections.js

Length of output: 2483


🏁 Script executed:

#!/bin/bash
# Check if the object ends with proper closure and if there's anything after the object definition
echo "=== Checking structure around line 30 and looking for closing brace ==="
sed -n '25,35p' src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== Checking total lines and what's near the end ==="
wc -l src/dashbls/depends/mimalloc/docs/dynsections.js
tail -5 src/dashbls/depends/mimalloc/docs/dynsections.js

Length of output: 508


🏁 Script executed:

#!/bin/bash
# Check the entire beginning of the file for wrapper functions
echo "=== First 50 lines of dynsections.js ==="
head -50 src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== Search for all global function definitions that delegate to dynsection ==="
grep -n "^function\s\|^const\s.*function" src/dashbls/depends/mimalloc/docs/dynsections.js | head -20

Length of output: 2280


🏁 Script executed:

#!/bin/bash
# Verify the complete structure: show wrapper functions and their relationship to dynsection methods
echo "=== All top-level function definitions in file ==="
grep -nE "^\s*(function|const)\s+(toggleLevel|toggleFolder|toggleVisibility|toggleInherit)" src/dashbls/depends/mimalloc/docs/dynsections.js

Length of output: 90


🏁 Script executed:

#!/bin/bash
# Search for ALL occurrences of the toggle methods to see if any are defined as global functions
echo "=== All lines containing toggleLevel ==="
grep -n "toggleLevel" src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== All lines containing toggleFolder ==="
grep -n "toggleFolder" src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== All lines containing toggleInherit ==="
grep -n "toggleInherit" src/dashbls/depends/mimalloc/docs/dynsections.js

Length of output: 236


🏁 Script executed:

#!/bin/bash
# Check if these methods are only defined as dynsection properties or also as global functions
echo "=== Context around toggleLevel definition ==="
grep -n "toggleLevel\s*:" src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== Context around toggleFolder definition ==="
grep -n "toggleFolder\s*:" src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== Context around toggleInherit definition ==="
grep -n "toggleInherit\s*:" src/dashbls/depends/mimalloc/docs/dynsections.js

echo ""
echo "=== Check if any are defined as standalone functions (not methods) ==="
grep -n "^function toggleLevel\|^function toggleFolder\|^function toggleInherit" src/dashbls/depends/mimalloc/docs/dynsections.js

Length of output: 323


Refactoring incomplete: three toggle methods lack global wrapper functions

The refactoring of dynsections.js is asymmetric and will cause runtime errors. Only toggleVisibility has a global wrapper function; toggleLevel, toggleFolder, and toggleInherit are defined only as dynsection object methods with no corresponding global functions. If Doxygen-generated HTML or external code calls these as globals (e.g., toggleLevel(level)), they will fail with "undefined" errors.

Add global wrapper functions for the three missing methods:

function toggleLevel(level) {
  return dynsection.toggleLevel(level);
}

function toggleFolder(id) {
  return dynsection.toggleFolder(id);
}

function toggleInherit(id) {
  return dynsection.toggleInherit(id);
}

Insert these after the existing toggleVisibility wrapper (around line 27).

🤖 Prompt for AI Agents
src/dashbls/depends/mimalloc/docs/dynsections.js lines ~30-124: three dynsection
methods (toggleLevel, toggleFolder, toggleInherit) are only defined as object
methods but lack global wrapper functions used by Doxygen-generated HTML; add
simple global wrappers after the existing toggleVisibility wrapper (around line
27) that call and return dynsection.toggleLevel(level),
dynsection.toggleFolder(id), and dynsection.toggleInherit(id) respectively so
external calls like toggleLevel(...), toggleFolder(...), and toggleInherit(...)
resolve.

Comment on lines +21 to +27
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix markdown list indentation to comply with linting rules.

Lines 21–27 have 2-space indentation before list markers, but markdownlint (MD007) expects unordered list items to start at column 0. Since this appears to be a direct copy of Microsoft's template, consider either:

  1. Removing the leading indentation to pass linting (preferred if the file will be part of your CI checks), or
  2. Disabling the MD007 rule for this file in your linter configuration if you want to preserve Microsoft's exact template formatting.
-  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
-  * Full paths of source file(s) related to the manifestation of the issue
-  * The location of the affected source code (tag/branch/commit or direct URL)
-  * Any special configuration required to reproduce the issue
-  * Step-by-step instructions to reproduce the issue
-  * Proof-of-concept or exploit code (if possible)
-  * Impact of the issue, including how an attacker might exploit the issue
+* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+* Full paths of source file(s) related to the manifestation of the issue
+* The location of the affected source code (tag/branch/commit or direct URL)
+* Any special configuration required to reproduce the issue
+* Step-by-step instructions to reproduce the issue
+* Proof-of-concept or exploit code (if possible)
+* Impact of the issue, including how an attacker might exploit the issue
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

21-21: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


22-22: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


23-23: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


24-24: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


25-25: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


26-26: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


27-27: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)

🤖 Prompt for AI Agents
In src/dashbls/depends/mimalloc/SECURITY.md around lines 21 to 27 the unordered
list items are indented by two spaces which violates markdownlint MD007 (list
items must start at column 0); fix by removing the leading two-space indentation
so each list marker begins at column 0, or if you must keep Microsoft’s
formatting, add an MD007 disable rule for this file in your linter config
(preferred: remove indentation).

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK 0ff505c

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