61bcdefg / Hikari-LLVM15

A fork of Hikari Obfuscator [WIP]
604 stars 187 forks source link

Bogus Control Flow crash #124

Open InstinctTheDevil opened 2 months ago

InstinctTheDevil commented 2 months ago

Hello,

I tried version 15 and 17 and both are crashing when using Bogus Control Flow.

Doing Post-Run Cleanup Hikari Out Spend Time: 1.3452160s Assertion failed: unsigned(ObjectIdx + NumFixedObjects) < Objects.size() && "Invalid Object Idx!", file C:\Users\PC\Hikari-LLVM15\llvm\include\llvm/CodeGen/MachineFrameInfo.h, line 485

InstinctTheDevil commented 2 months ago

Okay, I guess it doesn't work well with nlohmann json. I replaced it with json11 and it seems to work now.

Also had the same issue when using ThemIDA, always crashed using nlohmann.

Naville commented 2 months ago

Good, bug report without any reproducer.

But this crash seems like an backend bug, and should be reduced by an expert and submitted to LLVM upstream.

Also had the same issue when using ThemIDA, always crashed using nlohmann.

You mean this themida? If the program works fine when leaving compiler but crashes when another protector, it's (hopefully obviously) that protector's bug

Naville commented 2 months ago

Also, as a life-long professional Windows Hater, LLVM has sub-par support on Windows, esp when using Windows-specific language features like SEH / MSVC Intrinscis / MSFT C++ Extensions/ etc Use an actual OS designed by human beings, if that's possible

InstinctTheDevil commented 2 months ago

Never had issues using it on Windows except intrinsics ^^. Are you using Arch Linux? :D

It started to crash as soon as I had this included: nlohman::json::parse(string)

It only happend when having bogus control flow enabled, without everything was fine ^^ I was simply mentioning that I already had crashing problems before with themida.

Works fine now, except ConstantEncryption leads to crash (i will not further investigate why) and the StringEncryption has no effect. But those are features u can replace from other projects and will work afterwards

Naville commented 2 months ago

Never had issues using it on Windows except intrinsics ^^.

In recent versions it got better, but still bugs like https://github.com/llvm/llvm-project/issues/60914 remains unfixed

I was simply mentioning that I already had crashing problems before with themida.

I'm aware, that was a suggestion. From experience the biggest offender is usually indirectbranch, if you have that pass enabled.

StringEncryption has no effect.

Yeah it's inherently flawed and nobody should be actually using it

InstinctTheDevil commented 2 months ago

Does someone know a fix to the extreme RAM Usage when using indirect branches?