MethodJIT.cpp:263:1: error: size of array ‘js_static_assert98’ is negative

RESOLVED FIXED in mozilla13

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glandium, Unassigned)

Tracking

Trunk
mozilla13
Points:
---

Firefox Tracking Flags

(firefox7 unaffected, firefox8 unaffected, firefox9 affected, firefox10 affected)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Current mozilla-central fails to build with the following error:
js/src/methodjit/MethodJIT.cpp: At global scope:
js/src/methodjit/MethodJIT.cpp:263:1: error: size of array ‘js_static_assert98’ is negative

This is because VMFrame size is not a multiple of 16.
(Reporter)

Updated

6 years ago
status-firefox10: --- → affected
status-firefox7: --- → unaffected
status-firefox8: --- → unaffected
status-firefox9: --- → affected

Comment 1

6 years ago
Are you using Linux or Solaris?
(Reporter)

Comment 2

6 years ago
Linux, but it doesn't look like this would be OS specific.

Comment 3

6 years ago
VMFRAME do not need 16bytes align. Try this patch.

diff -r 879d466adbe0 js/src/methodjit/MethodJIT.cpp                             
--- a/js/src/methodjit/MethodJIT.cpp    Mon Nov 14 13:03:50 2011 -0800          
+++ b/js/src/methodjit/MethodJIT.cpp    Wed Nov 16 07:08:16 2011 +0800          
@@ -257,7 +257,7 @@                                                             
 #if defined(__GNUC__) && !defined(_WIN64)                                      
                                                                                
 /* If this assert fails, you need to realign VMFrame to 16 bytes. */           
-#ifdef JS_CPU_ARM                                                              
+#if defined(JS_CPU_ARM) || defined(JS_CPU_SPARC)                               
 JS_STATIC_ASSERT(sizeof(VMFrame) % 8 == 0);                                    
 #else                                                                          
 JS_STATIC_ASSERT(sizeof(VMFrame) % 16 == 0);
(Reporter)

Comment 4

6 years ago
(In reply to Leon Sha from comment #3)
> VMFRAME do not need 16bytes align. Try this patch.
> 
> diff -r 879d466adbe0 js/src/methodjit/MethodJIT.cpp                         
> 
> --- a/js/src/methodjit/MethodJIT.cpp    Mon Nov 14 13:03:50 2011 -0800      
> 
> +++ b/js/src/methodjit/MethodJIT.cpp    Wed Nov 16 07:08:16 2011 +0800      
> 
> @@ -257,7 +257,7 @@                                                         
> 
>  #if defined(__GNUC__) && !defined(_WIN64)                                  
> 
>                                                                             
> 
>  /* If this assert fails, you need to realign VMFrame to 16 bytes. */       
> 
> -#ifdef JS_CPU_ARM                                                          
> 
> +#if defined(JS_CPU_ARM) || defined(JS_CPU_SPARC)                           
> 
>  JS_STATIC_ASSERT(sizeof(VMFrame) % 8 == 0);                                
> 
>  #else                                                                      
> 
>  JS_STATIC_ASSERT(sizeof(VMFrame) % 16 == 0);

Apparently, this works fine.
Component: JavaScript Engine → Java-Implemented Plugins
Target Milestone: --- → mozilla10
Version: Trunk → Other Branch
Component: Java-Implemented Plugins → JavaScript Engine
Hardware: Sun → All
Target Milestone: mozilla10 → ---
Version: Other Branch → Trunk
(Reporter)

Comment 5

6 years ago
Created attachment 595999 [details] [diff] [review]
Don't require 16 bytes alignment for VMFrame on sparc
Attachment #595999 - Flags: review?(luke)

Updated

6 years ago
Attachment #595999 - Flags: review?(luke) → review+
(Reporter)

Comment 6

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/32bc6264f4bf
https://hg.mozilla.org/mozilla-central/rev/32bc6264f4bf
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.