Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strcpy to Known Inactive Functions #2236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ax3l
Copy link

@ax3l ax3l commented Feb 5, 2025

Seen in #2235 / ECP-WarpX/impactx#825

error: Enzyme: No augmented forward pass found for

Per discussion in #2235: Should this also go in another list?

@ax3l ax3l changed the title strcpy to KnownInactiveFunctionsStartingWith strcpy to Known Inactive Functions Feb 5, 2025
@ZuseZ4 ZuseZ4 requested a review from wsmoses February 5, 2025 07:22
@ax3l
Copy link
Author

ax3l commented Feb 5, 2025

I found another one for

error: Enzyme: No augmented forward pass found for _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::_M_replace(unsigned long, unsigned long, char const*, unsigned long))
 at context:   %16 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 0, i64 noundef 0, ptr noundef nonnull @.str.377, i64 noundef 15) #50
freeing without malloc   %32 = load ptr, ptr %7, align 8, !tbaa !17
...

error.txt

@ZuseZ4
Copy link
Member

ZuseZ4 commented Feb 5, 2025

Yes that's not uncommon. I had a few runs in the past where I added a lot fo them, but c++/compiler just keep adding new ones. Just add it to this PR, potentially use the demangled name (use cxx-filt)

@ax3l
Copy link
Author

ax3l commented Feb 5, 2025

Thanks!

$ echo "_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm" | c++filt 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)

Hm, that is already listed here?

// __cxx11
"std::__cxx11::basic_string",
"std::__cxx11::basic_ios",
"std::__cxx11::basic_ostringstream",
"std::__cxx11::basic_istringstream",
"std::__cxx11::basic_istream",
"std::__cxx11::basic_ostream",
"std::__cxx11::basic_ifstream",
"std::__cxx11::basic_ofstream",
"std::__cxx11::basic_stringbuf",
"std::__cxx11::basic_filebuf",
"std::__cxx11::basic_streambuf",
// non __cxx11
"std::basic_string",

@ax3l
Copy link
Author

ax3l commented Feb 5, 2025

When I add the mangled name to the same place as I added strcpy then I manage to suppress it.

Interesting that the demangled function name comparison in DemangledKnownInactiveFunctionsStartingWith does not seem to work for it. Hesitant to add it twice, lemme know what's best :)

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