Отключить *** обнаружен сбой стека ***: <неизвестно> завершено

Когда вы запускаете mount -t foo...или используете запись в fstabс файловой системой foo, mountфактически ищет вспомогательный двоичный файл mount.foo. Изman mountв Ubuntu, например:

For most types all the mount program has to do is issue a simple mount(2) system call, and no detailed knowledge of the filesystem type is required. For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems have a separate mount program. In order to make it possible to treat all types in a uniform way, mount will execute the program /sbin/mount.TYPE (if that exists) when called with type TYPE. Since various versions of the smbmount program have different calling conventions, /sbin/mount.smbfs may have to be a shell script that sets up the desired call.

Итак, нет, ядром является Джон Сноу, но mountумеет искать /sbin/mount.*команды.

0
16.07.2019, 23:26
1 ответ

Я не использую Ubuntu, но не думаю, что это возможно в более новых версиях glibc. См. commit .

Если не считать написания собственного детектора разрушения стека, конечно.

Вы можете посмотреть источник функции, печатающей это сообщение:

void
__attribute__ ((noreturn))
__fortify_fail_abort (_Bool need_backtrace, const char *msg)
{
  /* The loop is added only to keep gcc happy.  Don't pass down
     __libc_argv[0] if we aren't doing backtrace since __libc_argv[0]
     may point to the corrupted stack.  */
  while (1)
    __libc_message (need_backtrace ? (do_abort | do_backtrace) : do_abort,
            "*** %s ***: %s terminated\n",
            msg,
            (need_backtrace && __libc_argv[0] != NULL
             ? __libc_argv[0] : "<unknown>"));
}

Эта функция будет вызываться с помощью need_backtrace = Falseиз __stack_chk_fail, которая сама вызывается из кода защиты стека, скомпилированного в двоичный файл.

2
28.01.2020, 02:29

Теги

Похожие вопросы