[Ltrace-devel] [PATCH v2] Fix libunwind support for MIPS
Petr Machata
pmachata at gmail.com
Thu Jul 23 22:17:15 UTC 2015
Vicente Olivert Riera <Vincent.Riera at imgtec.com> writes:
> - int rc = unw_get_reg(&cursor, UNW_REG_IP,
> - (unw_word_t *) &ip);
> + int rc = unw_get_reg(&cursor, UNW_REG_IP, &uw_ip);
> + ip = (arch_addr_t) uw_ip;
> + assert(uw_ip == (unw_word_t) ip);
> +
> if (rc < 0) {
Sorry, I know this is literally what I said should be done, but when
unw_get_reg fails, uw_ip should be considered uninitialized and the
following assert might fail. Please move the assignment and the assert
behind the condition block.
Thank you,
Petr
More information about the Ltrace-devel
mailing list