[Bug 932] Constant indexing into array of structs crashes translator

bugzilla-daemon_at_mantis_dot_lbl_dot_gov
Date: Mon Jan 03 2005 - 14:54:09 PST

  • Next message: Venelin Mitov: "upc_mem* functions"
    http://mantis.lbl.gov/bugzilla/show_bug.cgi?id=932
    
    bonachea_at_cs_dot_berkeley_dot_edu changed:
    
               What    |Removed                     |Added
    ----------------------------------------------------------------------------
                     CC|                            |upc-users_at_lbl_dot_gov
             AssignedTo|jcduell_at_lbl_dot_gov             |cciancu_at_lbl_dot_gov
               Severity|normal                      |critical
              Component|upcc                        |Frontend
             OS/Version|other                       |All
               Platform|Other                       |All
                Summary|Constant indices compile    |Constant indexing into array
                       |errors                      |of structs crashes
                       |                            |translator
       Target Milestone|---                         |UPC Release 2.2
                Version|unspecified                 |Development head
    
    
    ---- Additional Comments From bonachea_at_cs_dot_berkeley_dot_edu  2005-01-03 14:54 ----
    Bug confirmed.
    
    Any time you see a compiler message starting with "### " (and no other error
    messages about incorrect input) that's a compiler crash and usually always
    indicates a bug in the translator. 
    
    By the way, the following code is unsafe in general:
    
        printf("t%d:hullcpy thread of dst->pts=%d\n", MYTHREAD, upc_threadof(dst-
    >pts));
    
    upc_threadof() returns a size_t, which is larger than an int on many platforms -
    you should always cast the result of upc_*of() to an (int) or (long) before
    passing it to printf (and use an appropriate printf format specifier). Otherwise
    printf may display garbage on some systems.
    
    
    
    
    
    
    ------- You are receiving this mail because: -------
    You are on the CC list for the bug, or are watching someone who is.
    

  • Next message: Venelin Mitov: "upc_mem* functions"