0

Application is supporting to 32bit. Facing issue while migrating from 32bit (armeabi-v7a) to 64bit (arm64-v8a).

Issue - assertion "orig___sfp" failed

In project, using two symbol __sfp and __sflag. These are working fine with 32bit. These symbols are used in one functionality.

int flags, oflags;

if ((flags = orig___sflags(mode, &oflags)) == 0)
    return (NULL);

my_FILE *fp;
    if ((fp = (my_FILE *)orig___sfp()) == NULL)
        return (NULL);

These symbols are hidden, found in below links. https://android.googlesource.com/platform/bionic/+/50a7621b3fc493ffbb72aa23e29a4f1727dc1f51/libc/stdio/local.h https://android.googlesource.com/platform/bionic/+/a818445%5E%21/

Can anyone know, which symbols are replaced in these place? Which are compatible for 64bit?

Bhumika Mehta
  • 31
  • 1
  • 5
  • `orig___sflags` must be an internal function, please verify how the return values are controlled on 32bit and 64bit compilation mode – TruthSeeker Nov 24 '20 at 10:39
  • Did you notice those symbols in the link you posted are all tagged with `__LIBC32_LEGACY_PUBLIC__ `? You're not going to have those on 64-bit implementations. Depending on implementation-specific features of internal objects such like `FILE` structures is fundamentally wrong, and it's biting you here. Don't do that, and you won't have these problems. – Andrew Henle Nov 24 '20 at 10:52
  • yes, I noticed this__LIBC32_LEGACY_PUBLIC__. But few functions are dependent on it. So looking for compatible symbols. – Bhumika Mehta Nov 24 '20 at 11:06
  • 1
    You're planning on repeating the same mistake of depending on internal implementation details that obviously can and do change? – Andrew Henle Nov 24 '20 at 11:11

0 Answers0