Unhandled Exception in `llviewerparceloverlay` when accessing `mOwnership[4096]`

Open Beginner friendly
#6,373 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@akleshchev is already working on this.

Since Sep 28, 2026.

  • #6384 by @akleshchev — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
game-dev

Research direction

Start in indra/newview/llviewerparceloverlay.cpp around lines 238-262 and inspect how col, row, and GRIDS_PER_EDGE are used before indexing mOwnership. Reproduce the crash with an object whose bounding box reaches x = 256 and y = 256 while the Build floater is open. Done means the boundary case no longer reads beyond mOwnership[4095] or crashes.

Written by the indexing model from the issue text.

Description

bug
Environment

Alchemy Test 26.4 but issue is upstream in current viewer code after looking into root cause

Description

llviewerparceloverlay.cpp tried to access mOwnership[4096] per:

U8 north_overlay = mOwnership[(row+1)*GRIDS_PER_EDGE+col];

With local variables set to: (per attached debugger)

col = 64
GRIDS_PER_EDGE = 64
row = 62

Which results in: (62+1)*64 + 64 = 4096
mOwnership is only buffered to 4096

Relevant code is:
https://github.com/secondlife/viewer/blob/c179f76c01a93fe6a46318be0e1c23a9d3089ddb/indra/newview/llviewerparceloverlay.cpp#L238-L262

Notice there are no guards for when col or row are 64 in either opposite condition, even though their values are used across both.

Reproduction steps

Got it randomly on right-click > edit on an object I was wanting to edit, think I misclicked onto a 256m megaprim which triggered the fault

To reproduce it, select any object whose bounding box reaches both x = 256 and y = 256 while the Build floater is open. It crashes only when the heap block happens to end on a page boundary; otherwise the read quietly returns a garbage byte.

Dominant language
C++
Stars
310
Forks
155
Avg merge
1d 2h
Merged PRs (30d)
111

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from secondlife/viewer

All issues in secondlife/viewer

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.