2021-03-03 03:21 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000799Frama-CPlug-in > slicingpublic2011-10-10 14:14
Reporterpascal 
Assigned ToAnne 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product VersionFrama-C GIT, precise the release id 
Target VersionFixed in VersionFrama-C Nitrogen-20111001 
Summary0000799: r12925: Slicing: missing label (csmith)
Description~/ppc/bin/toplevel.opt -val-signed-overflow-alarms s.15012623.1.c -cpp-command "gcc -m32 -C -E -D__FRAMAC -I. -I$CSMITH/runtime " -slice-calls Frama_C_show_each -slevel 5000 -slevel-function crc32_gentab:0 -then-on 'Slicing export' -print -ocode s.c

gcc -m32 s.c
s.c: In function ‘func_1_slice_1’:
s.c:187: error: label ‘lbl_156’ used but not defined
TagsNo tags attached.
Attached Files
  • c file icon s.15012623.1.c (6,962 bytes) 2011-04-18 09:30 -
    /*
     * This is a RANDOMLY GENERATED PROGRAM.
     *
     * Generator: csmith 2.0.0
     * svn version: exported
     * Options:   --max-array-dim 1 --max-funcs 1 --max-struct-fields 2 --no-pointers --no-volatiles --no-argc
     * Seed:      4194796242
     */
    
    #include "csmith.h"
    
    
    long __undefined;
    
    /* --- Struct/Union Declarations --- */
    /* --- GLOBAL VARIABLES --- */
    int32_t g_3 = 0x5E7A66FEL;
    int64_t g_25 = 0x5EC62BB2L;
    int8_t g_66 = 0xC6L;
    
    
    /* --- FORWARD DECLARATIONS --- */
    uint8_t  func_1(void);
    
    
    /* --- FUNCTIONS --- */
    /* ------------------------------------------ */
    /* 
     * reads : g_66 g_3 g_25
     * writes: g_3 g_66 g_25
     */
    uint8_t  func_1(void)
    { /* block id: 0 */
        int32_t l_2[2];
        int16_t l_6 = 0L;
        uint16_t l_91 = 1U;
        int64_t l_106 = (-1L);
        uint32_t l_112 = 0x5F4D78F3L;
        int8_t l_138 = 0xD0L;
        int i;
        for (i = 0; i < 2; i++)
            l_2[i] = 0L;
        for (g_3 = 0; g_3 < 2; g_3 += 1)
        { /* block id: 1 */
            int32_t l_17 = 0x03F0244CL;
        }
        for (g_66 = 0; g_66 < 2; g_66 += 2)
        { /* block id: 42 */
            int64_t l_85 = 2L;
            uint64_t l_90[7] = {0U, 0U, 0x03636CD8L, 0U, 0U, 0x03636CD8L, 0U};
            int16_t l_98 = (-6L);
            int i;
            if ((l_2[(uint8_t)(g_66) % 2] & (((safe_mod_func_int64_t_s_s(l_2[(uint8_t)(g_66) % 2], l_85)) || ((g_3 && (g_3 && l_2[(uint8_t)(g_66) % 2])) < l_6)) & (((safe_lshift_func_uint16_t_u_u(g_66, 8)) | ((g_3 || g_3) || (g_66 == g_3))) < (safe_sub_func_uint16_t_u_u(65529U, ((l_2[(uint8_t)(g_66) % 2] & l_90[1]) & l_85)))))))
            { /* block id: 43 */
                return l_91;
            }
            else
            { /* block id: 45 */
                uint16_t l_123[8] = {0x24ABL, 0x0812L, 0xCB4EL, 0xCB4EL, 0x0812L, 0x24ABL, 0x0812L, 0xCB4EL};
                const uint8_t l_155 = 3U;
                int i;
                for (g_25 = 0; (g_25 <= (-3)); g_25 = safe_sub_func_uint8_t_u_u(g_25, 1))
                { /* block id: 48 */
                    uint64_t l_105 = 1U;
                    int i;
                    l_106 ^= (((safe_add_func_int64_t_s_s((l_98 == (safe_add_func_uint64_t_u_u(18446744073709551615U, (g_66 <= l_2[(uint8_t)(g_66) % 2])))), 0xB3E5EB5CE3A63A67LL)) | g_25) <= ((~(l_6 ^ (safe_sub_func_uint8_t_u_u((g_3 == g_25), (safe_add_func_uint16_t_u_u(l_105, l_6)))))) == g_3));
                    if ((g_66 >= (((safe_lshift_func_uint16_t_u_u(((l_2[(uint8_t)(g_66) % 2] & l_2[(uint32_t)((g_66 + 1)) % 2]) < 0x4F54L), 13)) | g_3) | ((safe_rshift_func_uint8_t_u_u(((g_25 >= g_66) > (safe_unary_minus_func_uint16_t_u(l_2[(uint8_t)(g_66) % 2]))), ((l_112 ^ l_98) != 0xE2D3L))) != (-1L)))))
                    { /* block id: 50 */
                        g_3 = l_105;
                    }
                    else
                    { /* block id: 52 */
                        l_2[(uint8_t)(g_66) % 2] = g_66;
                    }
                    for (l_91 = 0; l_91 < 7; l_91 += 1)
                    { /* block id: 55 */
                        g_3 = (safe_mod_func_int16_t_s_s(0x03C1L, (safe_sub_func_uint64_t_u_u(g_3, (safe_rshift_func_uint8_t_u_s(((g_66 || (g_66 ^ l_2[0])) <= ((l_90[(l_91) % 7] | g_25) | (g_25 > g_25))), l_90[(l_91) % 7]))))));
                    }
                }
                if ((safe_mod_func_int16_t_s_s((3L == (safe_mul_func_int8_t_s_s((-9L), (((l_98 & l_123[7]) <= l_2[(uint32_t)((g_66 + 1)) % 2]) <= l_2[(uint32_t)((g_66 + 1)) % 2])))), 1U)))
                { /* block id: 59 */
                    return l_2[(uint32_t)(g_3) % 2];
                }
                else
                { /* block id: 61 */
                    for (g_3 = 0; (g_3 < 21); g_3 = safe_add_func_int64_t_s_s(g_3, 8))
                    { /* block id: 64 */
                        return l_2[(uint8_t)(g_66) % 2];
                    }
                    if ((safe_add_func_int8_t_s_s((-1L), l_123[7])))
                    { /* block id: 67 */
    lbl_156:
                        l_138 = (((((-6L) | 0U) && ((safe_mul_func_uint16_t_u_u(0xD558L, 0x8F55L)) ^ l_2[(uint8_t)(g_66) % 2])) | (g_25 && (safe_add_func_uint16_t_u_u((safe_rshift_func_uint8_t_u_u((safe_lshift_func_int8_t_s_u(g_25, l_123[7])), 1)), g_66)))) | 0x79608170AE80B3DFLL);
                    }
                    else
                    { /* block id: 69 */
                        uint16_t l_143 = 1U;
                        int32_t l_144 = 0xAC029035L;
                        int i;
                        for (l_106 = 0; l_106 < 8; l_106 += 1)
                        { /* block id: 70 */
                            l_2[(uint32_t)(g_3) % 2] = g_66;
                        }
                        l_2[(uint8_t)(g_66) % 2] = (safe_lshift_func_uint8_t_u_u(g_25, 7));
                        l_144 ^= ((safe_mul_func_int32_t_s_s(g_3, (((l_123[(uint64_t)(l_106) % 8] >= (l_2[(uint32_t)((g_66 + 1)) % 2] > g_25)) & l_2[(uint8_t)(g_66) % 2]) > l_143))) >= g_3);
                    }
                }
                if ((safe_mul_func_int16_t_s_s((((((l_123[2] && l_112) | l_123[7]) | ((safe_div_func_int32_t_s_s(g_3, l_90[1])) >= (safe_mod_func_int64_t_s_s(l_2[(uint8_t)(g_66) % 2], l_2[(uint32_t)((g_66 + 1)) % 2])))) > g_66) > (safe_mul_func_int8_t_s_s((safe_sub_func_int64_t_s_s((l_2[1] <= g_3), ((l_155 || l_123[7]) & (l_155 < l_2[(uint32_t)((g_66 + 1)) % 2])))), 0x21L))), 65535U)))
                { /* block id: 77 */
                    int i;
                    for (l_91 = 1; l_91 < 2; l_91 += 1)
                    { /* block id: 78 */
                        if (g_25)
                            goto lbl_156;
                        l_2[(l_91) % 2] &= 0x80926641L;
                        l_2[(uint8_t)(g_66) % 2] = ((safe_unary_minus_func_uint8_t_u(g_66)) >= 65534U);
                    }
                }
                else
                { /* block id: 83 */
                    uint8_t l_158 = 249U;
                    l_158 = l_106;
                    if (g_25)
                        continue;
                }
                if (g_25)
                    break;
            }
            return g_3;
        }
        return l_106;
    }
    
    
    
    
    /* ---------------------------------------- */
    int main (void)
    {
        int print_hash_value = 0;
        platform_main_begin();
        crc32_gentab();
        func_1();
        transparent_crc(g_3, "g_3", print_hash_value);
        transparent_crc(g_25, "g_25", print_hash_value);
        transparent_crc(g_66, "g_66", print_hash_value);
        platform_main_end(crc32_context ^ 0xFFFFFFFFUL);
        return 0;
    }
    
    /************************ statistics *************************
    XXX max struct depth: 0
    breakdown:
       depth: 0, occurrence: 23
    
    XXX max expression depth: 1
    breakdown:
       depth: 0, occurrence: 27
       depth: 1, occurrence: 8
    
    XXX total number of pointers: 0
    
    XXX times a non-volatile is read: 158
    XXX times a non-volatile is write: 26
    XXX times a volatile is read: 0
    XXX    times read thru a pointer: 0
    XXX times a volatile is write: 0
    XXX    times written thru a pointer: 0
    XXX times a volatile is available for access: 0
    XXX percentage of non-volatile access: 100
    
    XXX forward jumps: 0
    XXX backward jumps: 2
    
    XXX stmts: 92
    
    XXX percentage a fresh-made variable is used: 15.1
    XXX percentage an existing variable is used: 84.9
    ********************* end of statistics **********************/
    
    
    c file icon s.15012623.1.c (6,962 bytes) 2011-04-18 09:30 +

-Relationships
related to 0000786closedAnne 12816: Missing label in sliced program (csmith) 
+Relationships

-Notes

~0001795

Anne (reporter)

Slicing information is ok but problem during filtering : probably similar to 0000786.

~0001796

Anne (reporter)

Fixed by rev 12949 (better detection of labels on blocks)
+Notes

-Issue History
Date Modified Username Field Change
2011-04-18 09:30 pascal New Issue
2011-04-18 09:30 pascal Status new => assigned
2011-04-18 09:30 pascal Assigned To => Anne
2011-04-18 09:30 pascal File Added: s.15012623.1.c
2011-04-20 09:10 Anne Note Added: 0001795
2011-04-20 09:11 Anne Relationship added related to 0000786
2011-04-20 09:31 Anne Note Added: 0001796
2011-04-20 09:31 Anne Status assigned => resolved
2011-04-20 09:31 Anne Resolution open => fixed
2011-10-10 14:13 signoles Fixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14 signoles Status resolved => closed
+Issue History