Last Comment Bug 698923 - MethodJIT.cpp:263:1: error: size of array ‘js_static_assert98’ is negative
: MethodJIT.cpp:263:1: error: size of array ‘js_static_assert98’ is negative
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla13
Assigned To: general
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-01 15:32 PDT by Mike Hommey [:glandium]
Modified: 2012-02-14 02:20 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
unaffected
unaffected
affected
affected


Attachments
Don't require 16 bytes alignment for VMFrame on sparc (1.03 KB, patch)
2012-02-10 02:35 PST, Mike Hommey [:glandium]
luke: review+
Details | Diff | Review

Description Mike Hommey [:glandium] 2011-11-01 15:32:23 PDT
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.
Comment 1 Ginn Chen 2011-11-14 22:28:04 PST
Are you using Linux or Solaris?
Comment 2 Mike Hommey [:glandium] 2011-11-14 22:49:30 PST
Linux, but it doesn't look like this would be OS specific.
Comment 3 Leon Sha 2011-11-15 23:02:33 PST
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);
Comment 4 Mike Hommey [:glandium] 2011-11-25 09:24:42 PST
(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.
Comment 5 Mike Hommey [:glandium] 2012-02-10 02:35:20 PST
Created attachment 595999 [details] [diff] [review]
Don't require 16 bytes alignment for VMFrame on sparc
Comment 7 Marco Bonardo [::mak] 2012-02-14 02:20:54 PST
https://hg.mozilla.org/mozilla-central/rev/32bc6264f4bf

Note You need to log in before you can comment on or make changes to this bug.