<html>
<head>
<base href="https://bugzilla.icculus.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ahmedsayeed1982@yahoo.com" title="Ahmed <ahmedsayeed1982@yahoo.com>"> <span class="fn">Ahmed</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - MinGW + Clang doesn't like Opus"
href="https://bugzilla.icculus.org/show_bug.cgi?id=6089">bug 6089</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>ahmedsayeed1982@yahoo.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - MinGW + Clang doesn't like Opus"
href="https://bugzilla.icculus.org/show_bug.cgi?id=6089#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - MinGW + Clang doesn't like Opus"
href="https://bugzilla.icculus.org/show_bug.cgi?id=6089">bug 6089</a>
from <span class="vcard"><a class="email" href="mailto:ahmedsayeed1982@yahoo.com" title="Ahmed <ahmedsayeed1982@yahoo.com>"> <span class="fn">Ahmed</span></a>
</span></b>
<pre>gdb: fix value_subscript when array upper bound is not known
<a href="http://www-look-4.com/category/health/">http://www-look-4.com/category/health/</a>
Since commit 7c6f27129631 ("gdb: make get_discrete_bounds check for
<a href="https://komiya-dental.com/category/crypto/">https://komiya-dental.com/category/crypto/</a>
non-constant range bounds"), subscripting flexible array member fails:
<a href="http://www.iu-bloomington.com/category/health/">http://www.iu-bloomington.com/category/health/</a>
struct no_size
{ <a href="https://waytowhatsnext.com/category/health/">https://waytowhatsnext.com/category/health/</a>
int n;
int items[];
};
<a href="http://www.wearelondonmade.com/category/health/">http://www.wearelondonmade.com/category/health/</a>
(gdb) p *ns
$1 = {n = 3, items = 0x5555555592a4}
(gdb) p ns->items[0] <a href="http://www.jopspeech.com/category/health/">http://www.jopspeech.com/category/health/</a>
Cannot access memory at address 0xfffe555b733a0164
(gdb) p *((int *) 0x5555555592a4)
$2 = 101 <--- we would expect that <a href="http://joerg.li/category/health/">http://joerg.li/category/health/</a>
(gdb) p &ns->items[0]
$3 = (int *) 0xfffe5559ee829a24 <--- wrong address
<a href="http://connstr.net/category/health/">http://connstr.net/category/health/</a>
Since the flexible array member (items) has an unspecified size, the array
type <a href="https://www.mktrade.fi/muottivalmistus">https://www.mktrade.fi/muottivalmistus</a>
created for it in the DWARF doesn't have dimensions (this is with gcc
9.3.0, <a href="http://embermanchester.uk/category/health/">http://embermanchester.uk/category/health/</a>
Ubuntu 20.04):
<a href="http://www.slipstone.co.uk/category/health/">http://www.slipstone.co.uk/category/health/</a>
0x000000a4: DW_TAG_array_type
DW_AT_type [DW_FORM_ref4] (0x00000038 "int")
<a href="http://fishingnewsletters.co.uk/property/suluada/">http://fishingnewsletters.co.uk/property/suluada/</a>
DW_AT_sibling [DW_FORM_ref4] (0x000000b3)
<a href="http://www.logoarts.co.uk/category/health/">http://www.logoarts.co.uk/category/health/</a>
0x000000ad: DW_TAG_subrange_type
DW_AT_type [DW_FORM_ref4] (0x00000031 "long
unsigned int")
<a href="http://www.acpirateradio.co.uk/category/health/">http://www.acpirateradio.co.uk/category/health/</a>
This causes GDB to create a range type (TYPE_CODE_RANGE) with a defined
<a href="http://www.go-mk-websites.co.uk/health/tipaza-province/">http://www.go-mk-websites.co.uk/health/tipaza-province/</a>
constant low bound (dynamic _prop with kind PROP_CONST) and an undefined
high bound (dynamic_prop with kind PROP_UNDEFINED).
<a href="http://www.compilatori.com/category/health/">http://www.compilatori.com/category/health/</a>
value_subscript gets both bounds of that range using
get_discrete_bounds. Before commit 7c6f27129631, get_discrete_bounds
<a href="http://www.mconstantine.co.uk/health/shanghai/">http://www.mconstantine.co.uk/health/shanghai/</a>
didn't check the kind of the dynamic_props and would just blindly read
them as if they were PROP_CONST.
<a href="https://www.webb-dev.co.uk/category/health/">https://www.webb-dev.co.uk/category/health/</a> It would return 0 for the high
bound,
because we zero-initialize the range_bounds structure. And it didn't
really matter in this case, because the returned high bound wasn't used
in the end.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>