CyberShadow / RABCDAsm

Robust ABC (ActionScript Bytecode) [Dis-]Assembler
http://blog.thecybershadow.net/2010/05/05/announcing-rabcdasm/
GNU General Public License v3.0
431 stars 92 forks source link

AssertError when attempting to recompile asm: Predicate for isSorted is not antisymmetric. #33

Closed adammw closed 8 years ago

adammw commented 9 years ago

RABCDAsm seems to be fine extracting the abc code and then decompiling the extracted abc from the following SWF file available at: https://play.spotify.edgekey.net/client/d102aaf/flash/player.swf, however when attempting to recompile the main asasm file, the following assert error occurs:

core.exception.AssertError@/usr/local/Cellar/dmd/2.066.1/include/d2/std/algorithm.d(10709): Predicate for isSorted is not antisymmetric. Both pred(a, b) and pred(b, a) are true for certain values.
----------------
5   rabcasm                             0x000000010b4f275c pure nothrow @nogc bool std.algorithm.isSorted!(_D9asprogram7AStoABC19__T4PoolTdVbi0Vbi1Z4Pool8finalizeMFZ8sortPredFNaNbNiPS9asprogram7AStoABC19__T4PoolTdVbi0Vbi1Z4Pool5EntryPS9asprogram7AStoABC19__T4PoolTdVbi0Vbi1Z4Pool5EntryZb, asprogram.AStoABC.Pool!(double, false, true).Pool.Entry*[]).isSorted(asprogram.AStoABC.Pool!(double, false, true).Pool.Entry*[]) + 276
6   rabcasm                             0x000000010b52b39d pure void asprogram.AStoABC.Pool!(double, false, true).Pool.finalize() + 205
7   rabcasm                             0x000000010b5279eb asprogram.AStoABC asprogram.AStoABC.__ctor(asprogram.ASProgram) + 131
8   rabcasm                             0x000000010b4e3dd0 _Dmain + 368
9   rabcasm                             0x000000010b557a98 D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40
10  rabcasm                             0x000000010b5579dd void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 45
11  rabcasm                             0x000000010b557a3d void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() + 45
12  rabcasm                             0x000000010b5579dd void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 45
13  rabcasm                             0x000000010b557959 _d_run_main + 433
14  rabcasm                             0x000000010b4e3e94 main + 20
15  rabcasm                             0x000000010b4e3c58 start + 52
16  ???                                 0x0000000000000002 0x0 + 2
CyberShadow commented 9 years ago

What version of RABCDAsm are you using? I believe this problem to be fixed in master (a17a03e6f6baaf55b81f95b4f24af0db9a20cb55).

adammw commented 9 years ago

Using latest master, although the sha appears to be later: 8ab69fc6b73703ecf46ffa9f0bd23cb0de8b621b

CyberShadow commented 9 years ago

I managed to reproduce it. It looks like the same underlying problem as #31, with the same workaround applying (build without -inline or a different D compiler).

although the sha appears to be later: 8ab69fc

I meant that a17a03e6f6baaf55b81f95b4f24af0db9a20cb55 was the commit in which I thought I had fixed this bug.

CyberShadow commented 8 years ago

Should be fixed in v1.18.