diff options
-rwxr-xr-x | emscripten.py | 7 | ||||
-rw-r--r-- | src/headlessCanvas.js | 1 | ||||
-rw-r--r-- | src/jsifier.js | 2 | ||||
-rw-r--r-- | src/library.js | 25 | ||||
-rw-r--r-- | src/library_fs.js | 14 | ||||
-rw-r--r-- | src/library_idbfs.js | 324 | ||||
-rw-r--r-- | src/struct_info.json | 4 | ||||
-rw-r--r-- | tests/cases/fuzz6_ta2.ll | 3306 | ||||
-rw-r--r-- | tests/cases/fuzz6_ta2.txt | 1 | ||||
-rw-r--r-- | tests/core/test_exceptions_white_list_2.c | 27 | ||||
-rw-r--r-- | tests/core/test_exceptions_white_list_2.out | 1 | ||||
-rw-r--r-- | tests/core/test_sscanf_6.in | 14 | ||||
-rw-r--r-- | tests/core/test_sscanf_6.out | 1 | ||||
-rw-r--r-- | tests/fuzz/6.c | 1313 | ||||
-rw-r--r-- | tests/fuzz/6.c.txt | 1 | ||||
-rwxr-xr-x | tests/fuzz/csmith_driver.py | 5 | ||||
-rwxr-xr-x | tests/fuzz/test.sh | 13 | ||||
-rw-r--r-- | tests/test_core.py | 86 | ||||
-rw-r--r-- | tools/shared.py | 2 |
19 files changed, 4948 insertions, 199 deletions
diff --git a/emscripten.py b/emscripten.py index ce929858..77082aee 100755 --- a/emscripten.py +++ b/emscripten.py @@ -474,6 +474,9 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None, basic_vars.append('F_BASE_%s' % sig) asm_setup += ' var F_BASE_%s = %s;\n' % (sig, 'FUNCTION_TABLE_OFFSET' if settings.get('SIDE_MODULE') else '0') + '\n' + if '_rand' in exported_implemented_functions or '_srand' in exported_implemented_functions: + basic_vars += ['___rand_seed'] + asm_runtime_funcs = ['stackAlloc', 'stackSave', 'stackRestore', 'setThrew'] + ['setTempRet%d' % i for i in range(10)] # function tables function_tables = ['dynCall_' + table for table in last_forwarded_json['Functions']['tables']] @@ -518,6 +521,7 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None, exports = '{ ' + ', '.join(exports) + ' }' else: exports = '_main' + # calculate globals try: del forwarded_json['Variables']['globals']['_llvm_global_ctors'] # not a true variable @@ -975,6 +979,9 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, basic_vars.append('F_BASE_%s' % sig) asm_setup += ' var F_BASE_%s = %s;\n' % (sig, 'FUNCTION_TABLE_OFFSET' if settings.get('SIDE_MODULE') else '0') + '\n' + if '_rand' in exported_implemented_functions or '_srand' in exported_implemented_functions: + basic_vars += ['___rand_seed'] + asm_runtime_funcs = ['stackAlloc', 'stackSave', 'stackRestore', 'setThrew'] + ['setTempRet%d' % i for i in range(10)] # function tables function_tables = ['dynCall_' + table for table in last_forwarded_json['Functions']['tables']] diff --git a/src/headlessCanvas.js b/src/headlessCanvas.js index 6b0f9d47..4bd17a7b 100644 --- a/src/headlessCanvas.js +++ b/src/headlessCanvas.js @@ -446,6 +446,7 @@ function headlessCanvas() { case /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */ 0x8DFD: return 4096; case /* GL_MAX_VARYING_VECTORS */ 0x8DFC: return 32; case /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ 0x8B4D: return 32; + case /* GL_ARRAY_BUFFER_BINDING */ 0x8894: return 0; default: console.log('getParameter ' + pname + '?'); return 0; } }, diff --git a/src/jsifier.js b/src/jsifier.js index f4819584..ab5440f7 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1223,7 +1223,7 @@ function JSify(data, functionsOnly) { // in an assignment var disabled = DISABLE_EXCEPTION_CATCHING == 2 && !(item.funcData.ident in EXCEPTION_CATCHING_WHITELIST); var phiSets = calcPhiSets(item); - var call_ = makeFunctionCall(item, item.params, item.funcData, item.type, ASM_JS && !disabled, !!item.assignTo || !item.standalone, true); + var call_ = makeFunctionCall(item, item.params, item.funcData, item.type, ASM_JS && !disabled, !!item.assignTo || !item.standalone, !disabled); var ret; diff --git a/src/library.js b/src/library.js index 4c0f790f..d9e1942f 100644 --- a/src/library.js +++ b/src/library.js @@ -1642,6 +1642,7 @@ LibraryManager.library = { next = get(); {{{ makeSetValue('argPtr++', 0, 'next', 'i8') }}}; } + if (next === 0) return fields-1; // we failed to read this field formatIndex += nextC - formatIndex + 1; continue; } @@ -3447,13 +3448,25 @@ LibraryManager.library = { return limit; }, - // Use browser's Math.random(). We can't set a seed, though. - srand: function(seed) {}, // XXX ignored - rand: function() { - return Math.floor(Math.random()*0x80000000); + __rand_seed: 'allocate([0x0273459b, 0, 0, 0], "i32", ALLOC_STATIC)', + srand__deps: ['__rand_seed'], + srand: function(seed) { + {{{ makeSetValue('___rand_seed', 0, 'seed', 'i32') }}} + }, + rand_r__sig: 'ii', + rand_r__asm: true, + rand_r: function(seedp) { + seedp = seedp|0; + var val = 0; + val = ((Math_imul({{{ makeGetValueAsm('seedp', 0, 'i32') }}}, 31010991)|0) + 0x676e6177 ) & {{{ cDefine('RAND_MAX') }}}; + {{{ makeSetValueAsm('seedp', 0, 'val', 'i32') }}}; + return val|0; }, - rand_r: function(seed) { // XXX ignores the seed - return Math.floor(Math.random()*0x80000000); + rand__sig: 'i', + rand__asm: true, + rand__deps: ['rand_r', '__rand_seed'], + rand: function() { + return _rand_r(___rand_seed)|0; }, drand48: function() { diff --git a/src/library_fs.js b/src/library_fs.js index 63a8f8c5..c30876f5 100644 --- a/src/library_fs.js +++ b/src/library_fs.js @@ -1059,6 +1059,9 @@ mergeInto(LibraryManager.library, { opts = opts || {}; opts.flags = opts.flags || 'r'; opts.encoding = opts.encoding || 'binary'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } var ret; var stream = FS.open(path, opts.flags); var stat = FS.stat(path); @@ -1073,8 +1076,6 @@ mergeInto(LibraryManager.library, { } } else if (opts.encoding === 'binary') { ret = buf; - } else { - throw new Error('Invalid encoding type "' + opts.encoding + '"'); } FS.close(stream); return ret; @@ -1083,15 +1084,16 @@ mergeInto(LibraryManager.library, { opts = opts || {}; opts.flags = opts.flags || 'w'; opts.encoding = opts.encoding || 'utf8'; + if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { + throw new Error('Invalid encoding type "' + opts.encoding + '"'); + } var stream = FS.open(path, opts.flags, opts.mode); if (opts.encoding === 'utf8') { var utf8 = new Runtime.UTF8Processor(); var buf = new Uint8Array(utf8.processJSString(data)); - FS.write(stream, buf, 0, buf.length, 0); + FS.write(stream, buf, 0, buf.length, 0, opts.canOwn); } else if (opts.encoding === 'binary') { - FS.write(stream, data, 0, data.length, 0); - } else { - throw new Error('Invalid encoding type "' + opts.encoding + '"'); + FS.write(stream, data, 0, data.length, 0, opts.canOwn); } FS.close(stream); }, diff --git a/src/library_idbfs.js b/src/library_idbfs.js index 7f50f17e..e00dac10 100644 --- a/src/library_idbfs.js +++ b/src/library_idbfs.js @@ -5,14 +5,12 @@ mergeInto(LibraryManager.library, { indexedDB: function() { return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; }, - DB_VERSION: 20, + DB_VERSION: 21, DB_STORE_NAME: 'FILE_DATA', - // reuse all of the core MEMFS functionality mount: function(mount) { + // reuse all of the core MEMFS functionality return MEMFS.mount.apply(null, arguments); }, - // the only custom function IDBFS implements is to handle - // synchronizing the wrapped MEMFS with a backing IDB instance syncfs: function(mount, populate, callback) { IDBFS.getLocalSet(mount, function(err, local) { if (err) return callback(err); @@ -27,103 +25,46 @@ mergeInto(LibraryManager.library, { }); }); }, - reconcile: function(src, dst, callback) { - var total = 0; - - var create = {}; - for (var key in src.files) { - if (!src.files.hasOwnProperty(key)) continue; - var e = src.files[key]; - var e2 = dst.files[key]; - if (!e2 || e.timestamp > e2.timestamp) { - create[key] = e; - total++; - } - } - - var remove = {}; - for (var key in dst.files) { - if (!dst.files.hasOwnProperty(key)) continue; - var e = dst.files[key]; - var e2 = src.files[key]; - if (!e2) { - remove[key] = e; - total++; - } + getDB: function(name, callback) { + // check the cache first + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db); } - if (!total) { - // early out - return callback(null); + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); + } catch (e) { + return callback(e); } + req.onupgradeneeded = function(e) { + var db = e.target.result; + var transaction = e.target.transaction; - var completed = 0; - function done(err) { - if (err) return callback(err); - if (++completed >= total) { - return callback(null); - } - }; - - // create a single transaction to handle and IDB reads / writes we'll need to do - var db = src.type === 'remote' ? src.db : dst.db; - var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); - transaction.onerror = function transaction_onerror() { callback(this.error); }; - var store = transaction.objectStore(IDBFS.DB_STORE_NAME); - - for (var path in create) { - if (!create.hasOwnProperty(path)) continue; - var entry = create[path]; + var fileStore; - if (dst.type === 'local') { - // save file to local - try { - if (FS.isDir(entry.mode)) { - FS.mkdir(path, entry.mode); - } else if (FS.isFile(entry.mode)) { - var stream = FS.open(path, 'w+', 0666); - FS.write(stream, entry.contents, 0, entry.contents.length, 0, true /* canOwn */); - FS.close(stream); - } - done(null); - } catch (e) { - return done(e); - } + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); } else { - // save file to IDB - var req = store.put(entry, path); - req.onsuccess = function req_onsuccess() { done(null); }; - req.onerror = function req_onerror() { done(this.error); }; + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); } - } - for (var path in remove) { - if (!remove.hasOwnProperty(path)) continue; - var entry = remove[path]; + fileStore.createIndex('timestamp', 'timestamp', { unique: false }); + }; + req.onsuccess = function() { + db = req.result; - if (dst.type === 'local') { - // delete file from local - try { - if (FS.isDir(entry.mode)) { - // TODO recursive delete? - FS.rmdir(path); - } else if (FS.isFile(entry.mode)) { - FS.unlink(path); - } - done(null); - } catch (e) { - return done(e); - } - } else { - // delete file from IDB - var req = store.delete(path); - req.onsuccess = function req_onsuccess() { done(null); }; - req.onerror = function req_onerror() { done(this.error); }; - } - } + // add to the cache + IDBFS.dbs[name] = db; + callback(null, db); + }; + req.onerror = function() { + callback(this.error); + }; }, getLocalSet: function(mount, callback) { - var files = {}; + var entries = {}; function isRealDir(p) { return p !== '.' && p !== '..'; @@ -134,83 +75,192 @@ mergeInto(LibraryManager.library, { } }; - var check = FS.readdir(mount.mountpoint) - .filter(isRealDir) - .map(toAbsolute(mount.mountpoint)); + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); while (check.length) { var path = check.pop(); - var stat, node; + var stat; try { - var lookup = FS.lookupPath(path); - node = lookup.node; stat = FS.stat(path); } catch (e) { return callback(e); } if (FS.isDir(stat.mode)) { - check.push.apply(check, FS.readdir(path) - .filter(isRealDir) - .map(toAbsolute(path))); - - files[path] = { mode: stat.mode, timestamp: stat.mtime }; - } else if (FS.isFile(stat.mode)) { - files[path] = { contents: node.contents, mode: stat.mode, timestamp: stat.mtime }; - } else { - return callback(new Error('node type not supported')); + check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); } - } - return callback(null, { type: 'local', files: files }); - }, - getDB: function(name, callback) { - // look it up in the cache - var db = IDBFS.dbs[name]; - if (db) { - return callback(null, db); - } - var req; - try { - req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); - } catch (e) { - return onerror(e); + entries[path] = { timestamp: stat.mtime }; } - req.onupgradeneeded = function req_onupgradeneeded() { - db = req.result; - db.createObjectStore(IDBFS.DB_STORE_NAME); - }; - req.onsuccess = function req_onsuccess() { - db = req.result; - // add to the cache - IDBFS.dbs[name] = db; - callback(null, db); - }; - req.onerror = function req_onerror() { - callback(this.error); - }; + + return callback(null, { type: 'local', entries: entries }); }, getRemoteSet: function(mount, callback) { - var files = {}; + var entries = {}; IDBFS.getDB(mount.mountpoint, function(err, db) { if (err) return callback(err); var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); - transaction.onerror = function transaction_onerror() { callback(this.error); }; + transaction.onerror = function() { callback(this.error); }; var store = transaction.objectStore(IDBFS.DB_STORE_NAME); - store.openCursor().onsuccess = function store_openCursor_onsuccess(event) { + var index = store.index('timestamp'); + + index.openKeyCursor().onsuccess = function(event) { var cursor = event.target.result; + if (!cursor) { - return callback(null, { type: 'remote', db: db, files: files }); + return callback(null, { type: 'remote', db: db, entries: entries }); } - files[cursor.key] = cursor.value; + entries[cursor.primaryKey] = { timestamp: cursor.key }; + cursor.continue(); }; }); + }, + loadLocalEntry: function(path, callback) { + var stat, node; + + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + + if (FS.isDir(stat.mode)) { + return callback(null, { timestamp: stat.mtime, mode: stat.mode }); + } else if (FS.isFile(stat.mode)) { + return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); + } else { + return callback(new Error('node type not supported')); + } + }, + storeLocalEntry: function(path, entry, callback) { + try { + if (FS.isDir(entry.mode)) { + FS.mkdir(path, entry.mode); + } else if (FS.isFile(entry.mode)) { + FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true }); + } else { + return callback(new Error('node type not supported')); + } + + FS.utime(path, { timestamp: entry.timestamp }); + } catch (e) { + return callback(e); + } + + callback(null); + }, + removeLocalEntry: function(path, callback) { + try { + var lookup = FS.lookupPath(path); + var stat = FS.stat(path); + + if (FS.isDir(stat.mode)) { + FS.rmdir(path); + } else if (FS.isFile(stat.mode)) { + FS.unlink(path); + } + } catch (e) { + return callback(e); + } + + callback(null); + }, + loadRemoteEntry: function(store, path, callback) { + var req = store.get(path); + req.onsuccess = function(event) { callback(null, event.target.result); }; + req.onerror = function() { callback(this.error); }; + }, + storeRemoteEntry: function(store, path, entry, callback) { + var req = store.put(entry, path); + req.onsuccess = function() { callback(null); }; + req.onerror = function() { callback(this.error); }; + }, + removeRemoteEntry: function(store, path, callback) { + var req = store.delete(path); + req.onsuccess = function() { callback(null); }; + req.onerror = function() { callback(this.error); }; + }, + reconcile: function(src, dst, callback) { + var total = 0; + + var create = []; + Object.keys(src.entries).forEach(function (key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e.timestamp > e2.timestamp) { + create.push(key); + total++; + } + }); + + var remove = []; + Object.keys(dst.entries).forEach(function (key) { + var e = dst.entries[key]; + var e2 = src.entries[key]; + if (!e2) { + remove.push(key); + total++; + } + }); + + if (!total) { + return callback(null); + } + + var errored = false; + var completed = 0; + var db = src.type === 'remote' ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + + function done(err) { + if (err) { + if (!done.errored) { + done.errored = true; + return callback(err); + } + return; + } + if (++completed >= total) { + return callback(null); + } + }; + + transaction.onerror = function() { done(this.error); }; + + // sort paths in ascending order so directory entries are created + // before the files inside them + create.sort().forEach(function (path) { + if (dst.type === 'local') { + IDBFS.loadRemoteEntry(store, path, function (err, entry) { + if (err) return done(err); + IDBFS.storeLocalEntry(path, entry, done); + }); + } else { + IDBFS.loadLocalEntry(path, function (err, entry) { + if (err) return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done); + }); + } + }); + + // sort paths in descending order so files are deleted before their + // parent directories + remove.sort().reverse().forEach(function(path) { + if (dst.type === 'local') { + IDBFS.removeLocalEntry(path, done); + } else { + IDBFS.removeRemoteEntry(store, path, done); + } + }); } } }); diff --git a/src/struct_info.json b/src/struct_info.json index 32261c0a..2aeffc9c 100644 --- a/src/struct_info.json +++ b/src/struct_info.json @@ -141,7 +141,9 @@ }, { "file": "libc/stdlib.h", - "defines": [], + "defines": [ + "RAND_MAX" + ], "structs": { // NOTE: The hash sign at the end of this name is a hint to the processor that it mustn't prefix "struct " to the name to reference this struct. // It will be stripped away when writing the compiled JSON file. You can just refer to it as C_STRUCTS.div_t when using it in the JS code. diff --git a/tests/cases/fuzz6_ta2.ll b/tests/cases/fuzz6_ta2.ll new file mode 100644 index 00000000..dea3a21d --- /dev/null +++ b/tests/cases/fuzz6_ta2.ll @@ -0,0 +1,3306 @@ +; ModuleID = 'emcc-0-basebc.bc' +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" + +%struct.S3 = type { i32, i32 } +%struct.S1 = type { i32, i32, i8, i16 } +%union.U4 = type { i32 } +%struct.S2 = type { [2 x i8], [2 x i8] } +%struct.S0 = type { i32, [4 x i8], [4 x i8], [4 x i8], i8, [7 x i8] } + +@.str = private unnamed_addr constant [2 x i8] c"1\00", align 1 +@g_5 = internal unnamed_addr global i32 -1, align 4 +@.str1 = private unnamed_addr constant [4 x i8] c"g_5\00", align 1 +@g_25 = internal global %struct.S3 { i32 1301409902, i32 1607156808 }, align 8 +@.str2 = private unnamed_addr constant [8 x i8] c"g_25.f0\00", align 1 +@.str3 = private unnamed_addr constant [8 x i8] c"g_25.f1\00", align 1 +@g_49 = internal global [9 x %struct.S3] [%struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }, %struct.S3 { i32 -8, i32 -762592976 }], align 8 +@.str4 = private unnamed_addr constant [11 x i8] c"g_49[i].f0\00", align 1 +@.str5 = private unnamed_addr constant [11 x i8] c"g_49[i].f1\00", align 1 +@.str6 = private unnamed_addr constant [14 x i8] c"index = [%d]\0A\00", align 1 +@g_52 = internal global i32 2110022177, align 4 +@.str7 = private unnamed_addr constant [5 x i8] c"g_52\00", align 1 +@.str8 = private unnamed_addr constant [5 x i8] c"g_82\00", align 1 +@g_90 = internal global i32 888749341, align 4 +@.str9 = private unnamed_addr constant [5 x i8] c"g_90\00", align 1 +@g_92 = internal unnamed_addr global i8 -97, align 1 +@.str10 = private unnamed_addr constant [5 x i8] c"g_92\00", align 1 +@g_96 = internal global i8 -23, align 1 +@.str11 = private unnamed_addr constant [5 x i8] c"g_96\00", align 1 +@g_99 = internal global %struct.S1 { i32 -845795437, i32 0, i8 0, i16 4 }, align 4 +@.str12 = private unnamed_addr constant [8 x i8] c"g_99.f0\00", align 1 +@.str13 = private unnamed_addr constant [8 x i8] c"g_99.f1\00", align 1 +@.str14 = private unnamed_addr constant [8 x i8] c"g_99.f2\00", align 1 +@.str15 = private unnamed_addr constant [8 x i8] c"g_99.f3\00", align 1 +@g_103 = internal unnamed_addr global i16 23707, align 2 +@.str16 = private unnamed_addr constant [6 x i8] c"g_103\00", align 1 +@.str17 = private unnamed_addr constant [9 x i8] c"g_108.f0\00", align 1 +@.str18 = private unnamed_addr constant [9 x i8] c"g_108.f1\00", align 1 +@.str19 = private unnamed_addr constant [9 x i8] c"g_108.f2\00", align 1 +@.str20 = private unnamed_addr constant [9 x i8] c"g_108.f3\00", align 1 +@.str21 = private unnamed_addr constant [9 x i8] c"g_108.f4\00", align 1 +@.str22 = private unnamed_addr constant [9 x i8] c"g_108.f5\00", align 1 +@.str23 = private unnamed_addr constant [9 x i8] c"g_108.f6\00", align 1 +@.str24 = private unnamed_addr constant [9 x i8] c"g_109.f0\00", align 1 +@.str25 = private unnamed_addr constant [9 x i8] c"g_110.f0\00", align 1 +@g_183 = internal global %union.U4 zeroinitializer, align 4 +@.str26 = private unnamed_addr constant [9 x i8] c"g_183.f0\00", align 1 +@.str27 = private unnamed_addr constant [9 x i8] c"g_218.f0\00", align 1 +@g_258 = internal unnamed_addr global i8 -11, align 1 +@.str28 = private unnamed_addr constant [6 x i8] c"g_258\00", align 1 +@g_332 = internal unnamed_addr global i16 1, align 2 +@.str29 = private unnamed_addr constant [6 x i8] c"g_332\00", align 1 +@g_345 = internal global [10 x [1 x %union.U4]] [[1 x %union.U4] [%union.U4 { i32 -9 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -9 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -9 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -8 }], [1 x %union.U4] [%union.U4 { i32 -9 }]], align 4 +@.str30 = private unnamed_addr constant [15 x i8] c"g_345[i][j].f0\00", align 1 +@.str31 = private unnamed_addr constant [18 x i8] c"index = [%d][%d]\0A\00", align 1 +@.str32 = private unnamed_addr constant [9 x i8] c"g_393[i]\00", align 1 +@g_395 = internal global i16 -7025, align 2 +@.str33 = private unnamed_addr constant [6 x i8] c"g_395\00", align 1 +@.str34 = private unnamed_addr constant [6 x i8] c"g_398\00", align 1 +@g_404 = internal constant [9 x [3 x [7 x %struct.S1]]] [[3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }, %struct.S1 { i32 1, i32 349068844, i8 -1, i16 0 }, %struct.S1 { i32 -3, i32 9, i8 -61, i16 -1 }, %struct.S1 { i32 9, i32 0, i8 -11, i16 -30413 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }], [7 x %struct.S1] [%struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }, %struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 0, i32 8, i8 63, i16 -15114 }, %struct.S1 { i32 -237948286, i32 -602674988, i8 9, i16 -23496 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -4, i32 1865801250, i8 1, i16 -5 }, %struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }, %struct.S1 { i32 -624352579, i32 -2, i8 109, i16 -10276 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }, %struct.S1 { i32 -41003017, i32 1569787914, i8 -6, i16 18403 }, %struct.S1 { i32 -41003017, i32 1569787914, i8 -6, i16 18403 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -917235207, i32 -237206527, i8 -2, i16 0 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }, %struct.S1 { i32 0, i32 -270755058, i8 -10, i16 -6 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }], [7 x %struct.S1] [%struct.S1 { i32 1, i32 276540291, i8 -118, i16 -1 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 -1718057571, i32 0, i8 0, i16 -8992 }, %struct.S1 { i32 9, i32 0, i8 -11, i16 -30413 }], [7 x %struct.S1] [%struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 -1959266718, i32 1, i8 0, i16 -9111 }, %struct.S1 { i32 -1, i32 781657959, i8 57, i16 22085 }, %struct.S1 { i32 -2076059332, i32 -1205200163, i8 55, i16 -3996 }, %struct.S1 { i32 -1959266718, i32 1, i8 0, i16 -9111 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -1, i32 -263772962, i8 0, i16 1 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 1, i32 276540291, i8 -118, i16 -1 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -513205, i32 -1424064346, i8 -59, i16 5 }, %struct.S1 { i32 1184341626, i32 -1, i8 76, i16 1 }, %struct.S1 { i32 -1784578731, i32 -650939753, i8 7, i16 -13401 }, %struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }], [7 x %struct.S1] [%struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }, %struct.S1 { i32 -1, i32 -358692379, i8 0, i16 1 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -10, i32 1571736142, i8 8, i16 -9 }, %struct.S1 { i32 -4, i32 -392352954, i8 -1, i16 14048 }], [7 x %struct.S1] [%struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }, %struct.S1 { i32 -624352579, i32 -2, i8 109, i16 -10276 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 1774264700, i32 1743797768, i8 -12, i16 0 }, %struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }, %struct.S1 { i32 2018342595, i32 -68458340, i8 -1, i16 -13443 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 2018342595, i32 -68458340, i8 -1, i16 -13443 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }], [7 x %struct.S1] [%struct.S1 { i32 -4, i32 1, i8 1, i16 -28668 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }, %struct.S1 { i32 -1, i32 6, i8 57, i16 1 }, %struct.S1 { i32 -1357864411, i32 8, i8 91, i16 0 }, %struct.S1 { i32 1538544702, i32 -1554648331, i8 0, i16 -1 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 1184341626, i32 -1, i8 76, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }, %struct.S1 { i32 2128045624, i32 0, i8 -127, i16 -13358 }, %struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 -237948286, i32 -602674988, i8 9, i16 -23496 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }, %struct.S1 { i32 1338273418, i32 -692826440, i8 -5, i16 -6354 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -4, i32 1865801250, i8 1, i16 -5 }, %struct.S1 { i32 1774264700, i32 1743797768, i8 -12, i16 0 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -1357864411, i32 8, i8 91, i16 0 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }, %struct.S1 { i32 -124134025, i32 -1549553076, i8 1, i16 -3 }, %struct.S1 { i32 -10, i32 2023506657, i8 6, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -1, i32 2138051897, i8 -48, i16 -1 }, %struct.S1 { i32 1543082949, i32 -1355807875, i8 6, i16 -31022 }, %struct.S1 { i32 -2076059332, i32 -1205200163, i8 55, i16 -3996 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 0, i32 -1, i8 11, i16 26719 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }, %struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }], [7 x %struct.S1] [%struct.S1 { i32 759088742, i32 -2109967385, i8 -108, i16 5309 }, %struct.S1 { i32 9, i32 0, i8 -11, i16 -30413 }, %struct.S1 { i32 -1718057571, i32 0, i8 0, i16 -8992 }, %struct.S1 { i32 -7, i32 1258034932, i8 1, i16 -1 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 823728956, i32 -762967062, i8 -7, i16 -13824 }, %struct.S1 { i32 -1959266718, i32 1, i8 0, i16 -9111 }, %struct.S1 { i32 -917235207, i32 -237206527, i8 -2, i16 0 }, %struct.S1 { i32 -1, i32 -358692379, i8 0, i16 1 }, %struct.S1 { i32 -1865005823, i32 1247557675, i8 9, i16 -1 }, %struct.S1 { i32 -837942276, i32 -10, i8 -4, i16 -6 }, %struct.S1 { i32 -1865005823, i32 1247557675, i8 9, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -513205, i32 -1424064346, i8 -59, i16 5 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }, %struct.S1 { i32 -513205, i32 -1424064346, i8 -59, i16 5 }, %struct.S1 { i32 1538544702, i32 -1554648331, i8 0, i16 -1 }, %struct.S1 { i32 759088742, i32 -2109967385, i8 -108, i16 5309 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 -10, i32 1571736142, i8 8, i16 -9 }, %struct.S1 { i32 -1923318042, i32 1, i8 -50, i16 -29192 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -2076059332, i32 -1205200163, i8 55, i16 -3996 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -10, i32 1571736142, i8 8, i16 -9 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 1774264700, i32 1743797768, i8 -12, i16 0 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }, %struct.S1 { i32 1, i32 349068844, i8 -1, i16 0 }, %struct.S1 { i32 -1832135439, i32 -117259837, i8 -1, i16 -1 }, %struct.S1 { i32 -10, i32 2023506657, i8 6, i16 -1 }, %struct.S1 { i32 -124134025, i32 -1549553076, i8 1, i16 -3 }, %struct.S1 { i32 -2023789489, i32 -902579792, i8 -1, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 -1, i32 -263772962, i8 0, i16 1 }, %struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 1, i32 1260336922, i8 116, i16 13140 }, %struct.S1 { i32 -237948286, i32 -602674988, i8 9, i16 -23496 }, %struct.S1 { i32 -1865005823, i32 1247557675, i8 9, i16 -1 }], [7 x %struct.S1] [%struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }, %struct.S1 { i32 -1, i32 6, i8 57, i16 1 }, %struct.S1 { i32 -624352579, i32 -2, i8 109, i16 -10276 }, %struct.S1 { i32 -7, i32 759214664, i8 9, i16 -4 }, %struct.S1 { i32 -637055085, i32 -947781708, i8 4, i16 -6808 }, %struct.S1 { i32 2060359313, i32 0, i8 0, i16 -4 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 968381354, i32 -4, i8 -127, i16 -14432 }, %struct.S1 { i32 0, i32 1, i8 -66, i16 -1 }, %struct.S1 { i32 -837942276, i32 -10, i8 -4, i16 -6 }, %struct.S1 { i32 -244445179, i32 1776214206, i8 -2, i16 1 }, %struct.S1 { i32 -267149299, i32 -1636597397, i8 7, i16 13475 }, %struct.S1 { i32 1, i32 -5, i8 -10, i16 13038 }, %struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }], [7 x %struct.S1] [%struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -1, i32 -6, i8 -4, i16 2 }, %struct.S1 { i32 -1024677174, i32 -1, i8 -126, i16 -10239 }, %struct.S1 { i32 -1, i32 -6, i8 -4, i16 2 }, %struct.S1 { i32 1861205821, i32 110616061, i8 40, i16 -9 }, %struct.S1 { i32 -1411946461, i32 1547736314, i8 -89, i16 29618 }], [7 x %struct.S1] [%struct.S1 { i32 -1223483863, i32 -1578792888, i8 -22, i16 1 }, %struct.S1 { i32 506767331, i32 2, i8 53, i16 -3 }, %struct.S1 { i32 0, i32 5, i8 -6, i16 19467 }, %struct.S1 { i32 1, i32 -1042812290, i8 -97, i16 -20099 }, %struct.S1 { i32 1025177860, i32 6, i8 9, i16 9090 }, %struct.S1 { i32 1525253711, i32 -1607228738, i8 1, i16 -392 }, %struct.S1 { i32 2018342595, i32 -68458340, i8 -1, i16 -13443 }]], [3 x [7 x %struct.S1]] [[7 x %struct.S1] [%struct.S1 { i32 -1, i32 6, i8 57, i16 1 }, %struct.S1 { i32 -1258444377, i32 0, i8 -3, i16 -18764 }, %struct.S1 { i32 -3, i32 9, i8 -61, i16 -1 }, %struct.S1 { i32 -1718057571, i32 0, i8 0, i16 -8992 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 -3, i32 9, i8 -61, i16 -1 }, %struct.S1 { i32 0, i32 -866224393, i8 -65, i16 24132 }], [7 x %struct.S1] [%struct.S1 { i32 1338273418, i32 -692826440, i8 -5, i16 -6354 }, %struct.S1 { i32 0, i32 -270755058, i8 -10, i16 -6 }, %struct.S1 { i32 0, i32 5, i8 -6, i16 19467 }, %struct.S1 { i32 -1, i32 -263772962, i8 0, i16 1 }, %struct.S1 { i32 2, i32 -137424052, i8 1, i16 11792 }, %struct.S1 { i32 708881223, i32 670081913, i8 -53, i16 12097 }, %struct.S1 { i32 0, i32 1, i8 -23, i16 1 }], [7 x %struct.S1] [%struct.S1 { i32 1361878214, i32 -1, i8 115, i16 7 }, %struct.S1 { i32 -1, i32 60410192, i8 -105, i16 0 }, %struct.S1 { i32 -1, i32 -6, i8 -4, i16 2 }, %struct.S1 { i32 -992507318, i32 8, i8 90, i16 -12692 }, %struct.S1 { i32 0, i32 -866224393, i8 -65, i16 24132 }, %struct.S1 { i32 1361878214, i32 -1, i8 115, i16 7 }, %struct.S1 { i32 -1784578731, i32 -650939753, i8 7, i16 -13401 }]]], align 4 +@.str35 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f0\00", align 1 +@.str36 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f1\00", align 1 +@.str37 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f2\00", align 1 +@.str38 = private unnamed_addr constant [18 x i8] c"g_404[i][j][k].f3\00", align 1 +@.str39 = private unnamed_addr constant [22 x i8] c"index = [%d][%d][%d]\0A\00", align 1 +@g_452 = internal unnamed_addr global i1 false +@.str40 = private unnamed_addr constant [6 x i8] c"g_452\00", align 1 +@.str41 = private unnamed_addr constant [6 x i8] c"g_454\00", align 1 +@g_455 = internal unnamed_addr global [1 x i16] [i16 -21015], align 2 +@ |