Skip to content

Conversation

Vipul-Cariappa
Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa commented Sep 16, 2025

Description

Having static locals can be risky, and we might want to move them into the InterpreterInfo class.

Will open an issue on this; we can fix it later. I want to first make sure that this fixes the random crashes seen in our CI since the merge of thread-safety PR.

Fixes # (issue)

Hopfully this fixes the random failures that we are seeing in the CI.

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

TODOs for MySelf

  • In the following PR/this PR. Verify the logic for functions that take parent and interp as arguments. Like Cpp::GetNamed ...

having static locals can be risky and we might want to move them into the InterpreterInfo class
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.49%. Comparing base (0b1271a) to head (abd3866).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
+ Coverage   81.46%   81.49%   +0.03%     
==========================================
  Files           9        9              
  Lines        4213     4221       +8     
==========================================
+ Hits         3432     3440       +8     
  Misses        781      781              
Files with missing lines Coverage Δ
lib/CppInterOp/CppInterOp.cpp 89.64% <100.00%> (+0.03%) ⬆️
Files with missing lines Coverage Δ
lib/CppInterOp/CppInterOp.cpp 89.64% <100.00%> (+0.03%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

std::lock_guard<std::recursive_mutex> Lock(gWrapperStoreMutex);
auto R = gWrapperStore.find(FD);
if (R != gWrapperStore.end())
return (JitCall::GenericCall)R->second;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast]

      return (JitCall::GenericCall)R->second;
             ^

std::lock_guard<std::recursive_mutex> Lock(gDtorWrapperStoreMutex);
auto I = gDtorWrapperStore.find(D);
if (I != gDtorWrapperStore.end())
return (JitCall::DestructorCall)I->second;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast]

      return (JitCall::DestructorCall)I->second;
             ^

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.

1 participant