Project

General

Profile

Bug #17052 ยป ruby-addr2line-DW_FORM_ref_addr.patch

Correctly interpret the size of `DW_FORM_ref_addr` - xtkoba (Tee KOBAYASHI), 08/12/2021 09:56 PM

View differences:

addr2line.c
1137 1137
        set_uint_value(v, read_uleb128(reader));
1138 1138
        break;
1139 1139
      case DW_FORM_ref_addr:
1140
        if (reader->address_size == 4) {
1140
        if (reader->format == 4) {
1141 1141
            set_uint_value(v, read_uint32(&reader->p));
1142
        } else if (reader->address_size == 8) {
1142
        } else if (reader->format == 8) {
1143 1143
            set_uint_value(v, read_uint64(&reader->p));
1144 1144
        } else {
1145
            fprintf(stderr,"unknown address_size:%d", reader->address_size);
1145
            fprintf(stderr,"unknown format:%d", reader->format);
1146 1146
            abort();
1147 1147
        }
1148 1148
        break;