Closed
Bug 536568
Opened 15 years ago
Closed 11 years ago
nanojit::Allocator should return 8-aligned blocks
Categories
(Core Graveyard :: Nanojit, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: stejohns, Unassigned)
References
Details
Attachments
(1 file)
|
452 bytes,
application/octet-stream
|
Details |
Various bits of code (notably patches for https://bugzilla.mozilla.org/show_bug.cgi?id=533546) assume that the nanojit Allocator returns 8-aligned blocks, but it doesn't seem to enforce this. We should either guarantee 8-aligned pointers, or (at least) add a new API for allocating such pointers for the cases that really matter.
See enclosed patch with assertion that fails.
| Reporter | ||
Comment 1•15 years ago
|
||
BTW: the nature of Allocator is that it relies on the underlying system allocator to return 8-aligned chunks. The failure mode I see is on MacTel32 Debug avmshell builds; other builds may or may not be smarter, but IMHO we should require all builds to provide a predictable alignment.
Comment 2•15 years ago
|
||
(In reply to comment #1)
> BTW: the nature of Allocator is that it relies on the underlying system
> allocator to return 8-aligned chunks. The failure mode I see is on MacTel32
> Debug avmshell builds; other builds may or may not be smarter, but IMHO we
> should require all builds to provide a predictable alignment.
Allocator uses mmfx_alloc which is not guaranteed to return 8-aligned memory - it only guarantees memory aligned as strictly as the platform requires. An important reason for that fairly soft requirement is that mmfx_alloc may map directly to malloc, and malloc does not guarantee 8-alignment.
| Reporter | ||
Comment 3•15 years ago
|
||
Eek. Good to know. I'm guessing that only a subset of allocations need to be 8-aligned but those are pretty important. Perhaps we should add a separate API to Allocator to specifically request 8-alignment?
Updated•15 years ago
|
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Target Milestone: --- → Future
| Assignee | ||
Updated•11 years ago
|
Product: Core → Core Graveyard
Comment 4•11 years ago
|
||
Nanojit has been dead for several years. Its Bugzilla component has been moved to the graveyard (bug 984276).
I checked all the open bugs. They're all uninteresting, so I'm WONTFIXing them all. Apologies for the bugspam.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•