public inbox for developer@lists.illumos.org (since 2011-08)
 help / color / mirror / Atom feed
* [developer] REVIEW: 16850 genunix: array subscript [0, 9] is outside array bounds of 'hrtime_t[10]'
@ 2024-10-22  8:28 Toomas Soome via illumos-developer
  2024-10-22  8:40 ` Marcel Telka
  0 siblings, 1 reply; 4+ messages in thread
From: Toomas Soome via illumos-developer @ 2024-10-22  8:28 UTC (permalink / raw)
  To: illumos-developer

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

hi!

Please review: https://code.illumos.org/c/illumos-gate/+/3746

Validate array index.

thanks,
toomas
------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T0177fb8f02fbd3c0-M9084226e0992d8d2fb3c44f0
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

[-- Attachment #2: Type: text/html, Size: 1656 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [developer] REVIEW: 16850 genunix: array subscript [0, 9] is outside array bounds of 'hrtime_t[10]'
  2024-10-22  8:28 [developer] REVIEW: 16850 genunix: array subscript [0, 9] is outside array bounds of 'hrtime_t[10]' Toomas Soome via illumos-developer
@ 2024-10-22  8:40 ` Marcel Telka
  2024-10-22  8:46   ` Toomas Soome via illumos-developer
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Telka @ 2024-10-22  8:40 UTC (permalink / raw)
  To: illumos-developer

On Tue, Oct 22, 2024 at 11:28:24AM +0300, Toomas Soome via illumos-developer wrote:
> Please review: https://code.illumos.org/c/illumos-gate/+/3746

What exactly means '[0, 9]' in the error message?

-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel@telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+

------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T0177fb8f02fbd3c0-Mb6255c96a1026f2ecba898ad
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [developer] REVIEW: 16850 genunix: array subscript [0, 9] is outside array bounds of 'hrtime_t[10]'
  2024-10-22  8:40 ` Marcel Telka
@ 2024-10-22  8:46   ` Toomas Soome via illumos-developer
  2024-10-22  8:57     ` Marcel Telka
  0 siblings, 1 reply; 4+ messages in thread
From: Toomas Soome via illumos-developer @ 2024-10-22  8:46 UTC (permalink / raw)
  To: illumos-developer



> On 22. Oct 2024, at 11:40, Marcel Telka <marcel@telka.sk> wrote:
> 
> On Tue, Oct 22, 2024 at 11:28:24AM +0300, Toomas Soome via illumos-developer wrote:
>> Please review: https://code.illumos.org/c/illumos-gate/+/3746
> 
> What exactly means '[0, 9]' in the error message?
> 

The array size is defined by NMSTATES, which is 10 — that is, states are indexed [0-9], so the compiler is checking the index value 10…

rgds,
toomas


------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T0177fb8f02fbd3c0-M68655a5da190a9875a5f02bc
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [developer] REVIEW: 16850 genunix: array subscript [0, 9] is outside array bounds of 'hrtime_t[10]'
  2024-10-22  8:46   ` Toomas Soome via illumos-developer
@ 2024-10-22  8:57     ` Marcel Telka
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Telka @ 2024-10-22  8:57 UTC (permalink / raw)
  To: illumos-developer

On Tue, Oct 22, 2024 at 11:46:22AM +0300, Toomas Soome via illumos-developer wrote:
> 
> 
> > On 22. Oct 2024, at 11:40, Marcel Telka <marcel@telka.sk> wrote:
> > 
> > On Tue, Oct 22, 2024 at 11:28:24AM +0300, Toomas Soome via illumos-developer wrote:
> >> Please review: https://code.illumos.org/c/illumos-gate/+/3746
> > 
> > What exactly means '[0, 9]' in the error message?
> > 
> 
> The array size is defined by NMSTATES, which is 10 — that is, states are indexed [0-9], so the compiler is checking the index value 10…

Okay.  Apparently my question was not clear enough, so let's rephrase:

Does '[0, 9]' mean: an interval from 0 to 9 inclusive?

If so, then does:
        array subscript [0, 9] is outside array bounds of 'hrtime_t[10]'
mean:
        when array subscript is 0 to 9 then it is outside array bounds of
        'hrtime_t[10]'
?

Isn't the error message non-sense then?

-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel@telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+

------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T0177fb8f02fbd3c0-M6337dc168c579498be8fbde5
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-22  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-22  8:28 [developer] REVIEW: 16850 genunix: array subscript [0, 9] is outside array bounds of 'hrtime_t[10]' Toomas Soome via illumos-developer
2024-10-22  8:40 ` Marcel Telka
2024-10-22  8:46   ` Toomas Soome via illumos-developer
2024-10-22  8:57     ` Marcel Telka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).