smlxl / storage-layout-extractor

A tool that performs extraction of storage layouts based on EVM bytecode.
https://smlxl.io
GNU Affero General Public License v3.0
132 stars 11 forks source link

[BUG] Seaport overflows in the debug build #101

Open 2xic opened 1 year ago

2xic commented 1 year ago

Describe the Bug

In debug mode the tool will panic with an overflow when running the Seaport contract

To Reproduce

Run the Seaport contract with the tool.

0x60806040526004361015610023575b361561001957600080fd5b610021614f96565b005b60003560e01c80156100eb57806306fdde031461016957806346423aa7146101605780635b34b9661461015757806379df72bd1461014e57806387201b4114610145578063881477321461013c578063a817440414610133578063a900866b1461012a578063b3a34c4c14610121578063e7acab2414610118578063ed98a5741461010f578063f07ec37314610106578063f2d12b12146100fd578063f47b7740146100f4578063fb0f3ee1146100eb5763fd9f1e100361000e576100e6610f50565b61000e565b506100e66101c8565b506100e6610ec8565b506100e6610df2565b506100e6610d8a565b506100e6610cc2565b506100e6610c05565b506100e6610b81565b506100e6610b17565b506100e6610a60565b506100e66108d6565b506100e66107c6565b506100e661059d565b506100e66104f5565b506100e6610474565b506100e661042e565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126101c3576004359167ffffffffffffffff83116101c35782610240920301126101c35760040190565b600080fd5b506101d236610172565b6101243590600382169160021c91600183119234158403610420575b60038111907f0203020301010000000000000000000000000000000000000000000000000000811a9061024c8260a0850260240135887d010102030000000000000000000000000000000000000000000000000000851a888a61121a565b928060051b6101c4013596610260816106a8565b6102b3575050604435602435176102a55761028b9461027e916115b5565b61028661166d565b6159cc565b6102956001600055565b60405160018152602090f35b0390f35b636ab37ce76000526004601cfd5b610286925061028b969161032a916102c96111a8565b9384836102d682956106a8565b6002810361032f5750610325918a6102f060a082016111bf565b6102fc606083016111bf565b60c060e08401359301359173ffffffffffffffffffffffffffffffffffffffff33921690611efe565b611738565b612105565b610338816106a8565b600381036103875750610325918a61035260a082016111bf565b61035e606083016111bf565b60c060e08401359301359173ffffffffffffffffffffffffffffffffffffffff33921690611fff565b806103936004926106a8565b036103dc57610325918a6103a6816111bf565b6103b2606083016111bf565b9073ffffffffffffffffffffffffffffffffffffffff602060408501359401359216903390611efe565b610325918a6103ea816111bf565b6103f6606083016111bf565b9073ffffffffffffffffffffffffffffffffffffffff602060408501359401359216903390611fff565b61042934611d42565b6101ee565b50346101c35760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c357602080526707536561706f727460475260606020f35b50346101c35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c357600435600052600260205260806040600020546040519060ff81161515825260ff8160081c16151560208301526effffffffffffffffffffffffffffff8160101c16604083015260881c6060820152f35b50346101c35760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c35761052d614f7c565b3360005260016020526020604060002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff43014060801c018091556040518181527f721c20121297512b72821b97f5326877ea8ecf4bb9948fea5bfcb6453074d37f833392a2604051908152f35b50346101c3577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6020813601126101c3576004359067ffffffffffffffff82116101c3576101609082360301126101c35761061263ffffffff6020921661014461060982600401611cd6565b91013590612423565b604051908152f35b9181601f840112156101c35782359167ffffffffffffffff83116101c3576020808501948460051b0101116101c357565b73ffffffffffffffffffffffffffffffffffffffff8116036101c357565b60a435906106768261064b565b565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600611156106b257565b610676610678565b60809080516106c8816106a8565b83528173ffffffffffffffffffffffffffffffffffffffff918260208201511660208601526040810151604086015260608101516060860152015116910152565b90815180825260208080930193019160005b828110610729575050505090565b909192938260e0600192604088516107428382516106ba565b8085015173ffffffffffffffffffffffffffffffffffffffff1660a0840152015160c08201520195019392910161071b565b9092916040820191604081528451809352606081019260208096019060005b8181106107b0575050506107ad9394818403910152610709565b90565b8251151586529487019491870191600101610793565b5060e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c35767ffffffffffffffff6004358181116101c35761081290369060040161061a565b50506024358181116101c35761082c90369060040161061a565b50506044358181116101c35761084690369060040161061a565b50506064359081116101c35761086090369060040161061a565b505061087961086d610669565b60c43590608435611813565b906102a160405192839283610774565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101c3576004359067ffffffffffffffff82116101c3576108d29160040161061a565b9091565b50346101c3576108e536610889565b505060046108fb63ffffffff8235168201611aba565b90610904614f7c565b81519060005b82811061091d5760405160018152602090f35b8061092a60019286612988565b51805184608082015161093c81612934565b61094581612934565b14610a4857805173ffffffffffffffffffffffffffffffffffffffff1661096b82614762565b90610980826000526002602052604060002090565b61098a81846158f0565b5061099d610999825460ff1690565b1590565b6109ae575b50505050505b0161090a565b6109f4610a1f928460207ff280791efe782edcf06ce15c8f4dff17601db3b88eb3805a0db7d77faf757f04986060890151516101408a015103610a3b575b015191615199565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b610a2e60405192839283614e56565b0390a138808080806109a2565b610a43614c68565b6109ec565b50506109a8565b9060206107ad928181520190610709565b5060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c35760043567ffffffffffffffff8082116101c357610aab368360040161061a565b50506024359081116101c3576102a191610b0391610acc368260040161061a565b5050610afb610ae463ffffffff809416600401615ec5565b92610aed6110db565b926000845216600401611c52565b903392613b96565b604051918291602083526020830190610709565b50346101c35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c35773ffffffffffffffffffffffffffffffffffffffff600435610b688161064b565b1660005260036020526020604060002054604051908152f35b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040813601126101c3576004359067ffffffffffffffff82116101c35760409082360301126101c357610bfb610be363ffffffff602093166004016119cd565b610beb6110db565b9060008252339160243591613f10565b6040519015158152f35b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6080813601126101c3576004359067ffffffffffffffff908183116101c35760a09083360301126101c3576024359081116101c3576102a191610cb091610c71368260040161061a565b5050610ca060643592610c838461064b565b610c9663ffffffff80921660040161186c565b9216600401611a2d565b9133811502019160443591613f10565b60405190151581529081906020820190565b5060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c357600467ffffffffffffffff81358181116101c357610d0d3682850161061a565b5050602435908282116101c357610d263683860161061a565b50506044359283116101c357610d7b61087994610d453686830161061a565b5050610d5963ffffffff8094168201615ec5565b92610d7381610d666110db565b9660008852168301611b44565b951601611b44565b608435933393606435936126d4565b50346101c35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c3576020610612600435610dcb8161064b565b73ffffffffffffffffffffffffffffffffffffffff16600052600160205260406000205490565b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c35767ffffffffffffffff600480358281116101c357610e3d3682840161061a565b5050602435908382116101c357610e563683850161061a565b50506044359384116101c3576102a193610eb0610ebc94610e793684830161061a565b5050610e9f610ea860643595610e8e8761064b565b63ffffffff92838092168501611bf5565b97168301611a2d565b931601611c52565b91338115020192613b96565b60405191829182610a4f565b50346101c35760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c357610f006125a7565b606060005260205273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000f9490004c11cef243f5400493c00ad63166040526303312e3560635260a06000f35b50346101c357610f5f36610889565b90610f68614f7c565b600091825b818110610f925783610f855760405160018152602090f35b610f8d614d23565b610295565b80610fa06001928486614cc8565b94610faa866111bf565b907f6bacc01dbe442496068f7d234edd811f1a5f833243e0aec824f86ab861f3c90d611075611006610fde60208b016111bf565b93610feb60808c01614d16565b60048633148833141715911417179961014061060982611cd6565b9261104a61101e856000526002602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016610100179055565b60405193845273ffffffffffffffffffffffffffffffffffffffff9081169416929081906020820190565b0390a301610f6d565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519060a0820182811067ffffffffffffffff8211176110ce57604052565b6110d661107e565b604052565b604051906020820182811067ffffffffffffffff8211176110ce57604052565b604051906040820182811067ffffffffffffffff8211176110ce57604052565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff8211176110ce57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff811161119b575b01160190565b6111a361107e565b611195565b6111b06110fb565b90602082526020828136910137565b356107ad8161064b565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101c3570180359067ffffffffffffffff82116101c3576020019181360383136101c357565b959392919094611228614f4e565b61123061155f565b6101643561014435428211154282111761154b57505061020435610264351061153d5793907f42d81c6929ffdc4eb27a0808e40e82516ad42296c166065de7f812492304ff6e6080528060a0526060602460c037604060646101203760e06080908120610160526001610264359081016102a060059290921b918201526102c081019283526024906102e00137610160948360a0528460c052600060e05260009260005b83610204358210156113315790604060019261010060a060208560061b9a818c610284018537858c61028401610120376102a48c0135179d019860e06080208a5201988a8a528b60c08401526102840191013701969392966112d4565b5096509192979690976001610204350160051b610160206060525b836102643588101561138957906102a460a060019301958787528860c082015260408a60061b91610100836102840191013701351796019561134c565b50925095945095925073ffffffffffffffffffffffffffffffffffffffff91501161152f576107ad91611528917fa66999307ad1bb4fde44d13a5d710bd7718e0c87c1eef68a571629fbf5b93d026080528060a052606060c460c03760206101046101203760c0608020600052602060002060e05260016102643560051b610200015261022090816102643560051b0152606060c46102406102643560051b013761036060843561145a8173ffffffffffffffffffffffffffffffffffffffff166000526001602052604060002090565b54967ffa445660b7e21515a59617fcd68910b487aa5808b8abda3d78bc85df364b2c2f6080526040608460a037606051610100526101205260a0610144610140376101e09687526101809687608020976102643560051b0191888352336101a06102643560051b015260806101c06102643560051b0152610120826102643560051b01527f9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f3160a06102643502938460a435940190a360006060526102643560051b01016040528101906111c9565b908361430d565b6339f3e3fd6000526004601cfd5b63466aa6166000526004601cfd5b6321ccfeb76000526020526040526044601cfd5b7401000000000000000000000000000000000000000060243560c4351760a43560843517171060186101243510166102643560061b61026001610244351461024061022435146020600435141616161561152f57565b608435916101043560e43560c4358315611627579461067695604051957f4ce34aa200000000000000000000000000000000000000000000000000000000875260206004880152600160248801526044870152606486015260848501523360a485015260c484015260e483015261223e565b925092806116366002926106a8565b0361166057928360016106769503611651575b503391614fab565b61165a90611d31565b38611649565b919061067693339161508a565b3460643560006102643560061b815b8181106116bd575050508181116116b0575b61169a81608435611d62565b8082116116a5575050565b610676910333611d62565b6116b8611d22565b61168e565b806102840135948086116116e657906116e08660409303966102a4830135611d62565b0161167c565b638ffff98084526004601cfd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9190820391821161173057565b6106766116f3565b919082156117d95760843592610104353360c43560e4355b6117cc575b8360051b6101e40335936102643560061b9060005b82811061177f57505050956106769596611dae565b87876102848301358c856117ab575b918493916117a5936102a46040970135908a611dae565b0161176a565b9891816117bf60409695936117a595611723565b9a9193509193945061178e565b6117d4611d53565b611755565b3392606435608435602435604435611750565b60209067ffffffffffffffff8111611806575b60051b0190565b61180e61107e565b6117ff565b906108d2929163ffffffff9161182f8360043516600401611bf5565b926118408160243516600401611a2d565b6118606118538360443516600401611b44565b9260643516600401611b44565b923381150201946126d4565b90604051610200810160405260806118c68294604060208201602086013760a084018085526118a563ffffffff918284351684016118f5565b6118b68160608401351683016118cb565b60608601528382013516016118cb565b910152565b9060206040519263ffffffff813563ffffffe0601f82011692848401908737168452830101604052565b6118c660609161016081853763ffffffff611917816040840135168301611927565b604086015283820135160161197a565b90641fffffffe082359263ffffffff841660405194818652602093849160051b168601019283928160a0809402910185378086015b83811061196c5750505050604052565b84815293820193810161195c565b90641fffffffe082359263ffffffff841660405194818652602093849160051b168601019283928160c0809402910185378086015b8381106119bf5750505050604052565b8481529382019381016119af565b906040516102008101604052611a13819360a083018084526119f963ffffffff918284351684016118f5565b6001602085015260016040850152602082013516016118cb565b606082015260806040519160208301604052600083520152565b803591600592641fffffffe081851b16604080519060209384848401018252829663ffffffff809216845260005b858110611a6e5750505050505050909150565b8083888093850101351683018551908360a091828401895287608093848484018737820135160101908d60018884351601901b8851928184018a52833782015282828801015201611a5b565b908135641fffffffe08160051b166040805160209384848301018352819663ffffffff809216835260005b858110611af55750505050505050565b808388809385010135168301611b34838851928984016101a085018b52611b2581848b81860135168501016118f5565b8452878a8201351601016118cb565b8382015282828701015201611ae5565b90813591641fffffffe08360051b166040516020928383830101604052819563ffffffff809116835260005b848110611b7f57505050505050565b80611b9587848180958801013516860101611ba1565b82828701015201611b70565b90813591604080519363ffffffff81168552602080641fffffffe08360051b168701019381643fffffffc0869460061b16910185378086015b828110611be75750505052565b848152938301938101611bda565b90813591641fffffffe08360051b166040516020928383830101604052819563ffffffff809116835260005b848110611c3057505050505050565b80611c468784818095880101351686010161186c565b82828701015201611c21565b908135641fffffffe08160051b166040805160209384848301018352819663ffffffff809216835260005b858110611c8d5750505050505050565b808388809385010135168301611cc6838851928984018a52611cb782898184013516830101611ba1565b8452878a820135160101611ba1565b8382015282828701015201611c7d565b9060405161016081016040528092611d16610140918281853763ffffffff611d05816040840135168301611927565b60408601526060820135160161197a565b80606084015251910152565b50638ffff9806000526004601cfd5b6369f958276000526020526024601cfd5b63a61be9f06000526020526024601cfd5b50636ab37ce76000526004601cfd5b611d6b82611d99565b600080808085855af115611d7d575050565b611d85612681565b63bc806b966000526020526040526044601cfd5b15611da057565b6391b3e5146000526004601cfd5b929193949094611dbd83611d99565b611dc781836120f2565b80611ef0575050604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d1515811615611e36575b505050505050604052606052565b80863b151516611e2857908795969115611e5b5786635f15d67287526020526024601cfd5b959192939515611e80575063988919238594526020526040526060526080526084601cfd5b3d611ea3575b5063f486bc87845260205260405260605260805260a05260a4601cfd5b601f3d0160051c9060051c908060030291808211611ed7575b505060205a910110611ece5785611e86565b833d81803e3d90fd5b8080600392028380020360091c92030201018680611ebc565b906106769592949391612359565b919395909294611f0e81836120f2565b80611f375750508460016106769603611f28575b50614fab565b611f3190611d31565b38611f22565b815160649693959394929190602003611fec5760c0906001906040845260208401527f4ce34aa20000000000000000000000000000000000000000000000000000000060408401526020604484015280888401525b02019360027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc48601527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe48501526004840152602483015260448201520152565b5060c08682016001815101809152611f8c565b95909192939461200e86611d99565b61201881836120f2565b806120285750506106769461508a565b90606495969493929160208251146000146120df5760c0906001906040845260208401527f4ce34aa20000000000000000000000000000000000000000000000000000000060408401526020604484015280888401525b02019360037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc48601527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe48501526004840152602483015260448201520152565b5060c0868201600181510180915261207f565b906020820151036121005750565b610676905b90604082510361223a5760208201519160c06064820151026044019260405193602073ffffffffffffffffffffffffffffffffffffffff6000928184927f00000000000000000000000000000000f9490004c11cef243f5400493c00ad631674ff00000000000000000000000000000000000000001783528584527f023d904f2503c37127200ca07b976c3a53cc562623f67023115bf311f58050596040526055600b2016976040528180526040860182895af190805191156122215750937f4ce34aa2000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000060209596160361221557505052565b61221e91612345565b52565b63d13d53d48691612230612681565b526020526024601cfd5b9050565b9060405190602073ffffffffffffffffffffffffffffffffffffffff6101046000938285937f00000000000000000000000000000000f9490004c11cef243f5400493c00ad631674ff00000000000000000000000000000000000000001784528785527f023d904f2503c37127200ca07b976c3a53cc562623f67023115bf311f58050596040526055600b20169560405282805282865af1908051911561233657507fffffffff000000000000000000000000000000000000000000000000000000007f4ce34aa20000000000000000000000000000000000000000000000000000000091160361232d575050565b61067691612345565b63d13d53d49150612230612681565b631cf99b266000526020526040526044601cfd5b9060649492939160208251146000146124105760c0906001906040845260208401527f4ce34aa20000000000000000000000000000000000000000000000000000000060408401526020604484015280878401525b02019260017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc48501527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe484015260048301526024820152600060448201520152565b5060c085820160018151018091526123ae565b91909161014081018051917fa66999307ad1bb4fde44d13a5d710bd7718e0c87c1eef68a571629fbf5b93d02604051604083018051928351926020809501906000915b868684106125665750505050506040519160051b8220917f42d81c6929ffdc4eb27a0808e40e82516ad42296c166065de7f812492304ff6e9093606086019481865101906000915b8a83106125245750505050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08660051b604051209401978851907ffa445660b7e21515a59617fcd68910b487aa5808b8abda3d78bc85df364b2c2f8a5282519383528451958552865261018089209852525252565b8380827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0600194510180519089815260e08120875252019201920191906124ae565b80827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0600194510180519088815260c0812087525201920192019190612466565b6000467f0000000000000000000000000000000000000000000000000000000000000001036125f557507f0d725b53ccd7c23735755082eee9d43d3add450d3564ad51af0d29aa16eeab3c90565b60405190608051907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527f32b5c112df393a49218d7552f96b2eeb829dfb4272f4f24eef510a586b85feef6020527f65f792c4319563f3a8f1ce154ef783f165de90334a87a1918514e159542a735a604052466060523060805260a081209260405260605260805290565b3d61268857565b601f3d0160051c60405160051c9080600302918082116126bb575b505060205a9101106126b157565b3d6000803e3d6000fd5b8080600392028380020360091c920302010138806126a3565b93959480939297956126e692866129aa565b93909187519681516127006126fb828b612e96565b613328565b9860009a8b905b8282106127cb5750506000925b8284106127575750505050509461273b949587829861274c575b5081511561273f576136dc565b9190565b61274761338b565b6136dc565b82510382523861272e565b909192939a8a6127738361276c8f8990612988565b5189613408565b61278c8180516080602082511515930151910151141690565b156127a65750506001809101945b019291909a939a612714565b86916127c5916127be85886001979b01038093612988565b528d612988565b5061279a565b90949b6127e7896127e0888598969798612988565b518961339a565b8c6128018280516080602082511515930151910151141690565b1561281d5750506001809101955b01909b949b93929193612707565b879161283a91846001959a03916128348383612988565b52612988565b5061280f565b6128486110ae565b90604051610160810181811067ffffffffffffffff8211176128c7575b604052600080825280602083015260609182604082015282808201528160808201528160a08201528160c08201528160e08201528161010082015281610120820152816101408201528452806020850152604084015280808401526080830152565b6128cf61107e565b612865565b6128dc6110fb565b600181529060203681840137565b906128fc6128f7836117ec565b61111b565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061292a82946117ec565b0190602036910137565b600511156106b257565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60209080511561297c570190565b61298461293e565b0190565b602091815181101561299d575b60051b010190565b6129a561293e565b612995565b9391936000936129b8614f5d565b6000357c400000000000000000000000000000000000000000000000000000000016926129e3612840565b508251936129f0856128ea565b9760205b6001870160051b8110612ac6575050907c4000000000000000000000000000000000000000000000000000000001612a329214612ab9575b83612fb7565b60205b6001840160051b8110612a485750505050565b6020816001928901518015612ab357612aab90828701515186612a7f825173ffffffffffffffffffffffffffffffffffffffff1690565b8287015173ffffffffffffffffffffffffffffffffffffffff165b906060604085015194015194614232565b019050612a35565b50612aab565b612ac1612f94565b612a2c565b808601518215612c5557612ad981614668565b918d82969215612c42578501527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019382519260a08401519360c08101519060408101519e8f519160800151612b2e81612934565b60048110600052600110179e60005b828110612bd757505050606080925101519485519560005b878110612b6e5750505050505050506020905b016129f4565b80878760a0612b7f60019587612988565b51612bb789898c6080850196612b9788518a83612f61565b9186019889519089518214600014612bc7575050508088525b8751612eef565b8094520190815190525201612b55565b612bd092612f61565b8852612bb0565b8087612be560019385612988565b519c8d600051905110179c612c28878c60808401938c6060612c0987518984612f61565b92019687519087518214600014612c32575050508086525b8551612ea3565b8092525201612b3d565b612c3b92612f61565b8652612c21565b5050935050906000602080930152612b68565b906000602080930152612b68565b939193600093612c71614f5d565b6000357c40000000000000000000000000000000000000000000000000000000001692612c9c612840565b50825193612ca9856128ea565b9760205b6001870160051b8110612d45575050907c4000000000000000000000000000000000000000000000000000000001612cea9214612ab95783612fb7565b60205b6001840160051b8110612d005750505050565b6020816001928901518015612d3f57612d3790828701515186612a7f825173ffffffffffffffffffffffffffffffffffffffff1690565b019050612ced565b50612d37565b808601518215612e7557612d5881614414565b918d82969215612e62578501527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019382519260a08401519360c08101519060408101519e8f519160800151612dad81612934565b60048110600052600110179e60005b828110612e2657505050606080925101519485519560005b878110612ded5750505050505050506020905b01612cad565b80878760a0612dfe60019587612988565b51612e1689898c6080850196612b9788518a83612f61565b8094520190815190525201612dd4565b8087612e3460019385612988565b519c8d600051905110179c612e58878c60808401938c6060612c0987518984612f61565b8092525201612dbc565b5050935050906000602080930152612de7565b906000602080930152612de7565b8181029291811591840414171561173057565b9190820180921161173057565b929092838103612eb35750505090565b612ec983612ecf93039342039182850390612e83565b93612e83565b8201809211612ee2575b81049015150290565b612eea6116f3565b612ed9565b919092838303612eff5750505090565b600192612f1883612f1e93039342039182850390612e83565b94612e83565b8301809311612f54575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830104019015150290565b612f5c6116f3565b612f28565b919091828114612f8e5782818309612f8057612f7c91612e83565b0490565b63c63cf0896000526004601cfd5b50905090565b506312d3f5a36000526004601cfd5b600211156106b257565b516107ad816106a8565b815181519260005b8281106130c05750505060005b828110612fd857505050565b612fe28183612988565b5161301661300260208301516effffffffffffffffffffffffffffff1690565b6effffffffffffffffffffffffffffff1690565b156130b75751606081018051519060005b828110613089575050506040018051519060005b82811061304f575050506001905b01612fcc565b8061306f6130696130636001948651612988565b51612fad565b60031090565b61307a575b0161303b565b61308481866131ba565b613074565b8061309d6130696130636001948651612988565b6130a8575b01613027565b6130b281876131a6565b6130a2565b50600190613049565b6130ca8183612988565b516130df81518781101561317a575b86612988565b51602090613101613002838301516effffffffffffffffffffffffffffff1690565b1561316f57519060409081830151918401519263bfb3f8ce9185015161312681612fa3565b61312f81612fa3565b61315c575b50815183101561315357509161314d91600194936131d7565b01612fbf565b6000526004601cfd5b9050606091500151636088d7de38613134565b50505060019061314d565b613190602084015161318b81612fa3565b613195565b6130d9565b63133c37c66000526020526024601cfd5b63a8930e9a6000526020526040526044601cfd5b63d69293326000526020526040526044601cfd5b61221e826106a8565b906131e191612988565b518051916131ee836106a8565b600383111561324d5761322e8260046040606095019586518015156000146132345761322490878701519060808801519161326a565b14600303906131ce565b01519052565b50608085015151156132245761324861325b565b613224565b6394eb6af66000526004601cfd5b506309bde3396000526004601cfd5b916000928352602090818420918082019181815191600592831b0101905b8184106132a857505050500361329b5750565b6309bde33990526004601cfd5b8351808611821b95865294831894909452604086209392820192613288565b604051906060820182811067ffffffffffffffff82111761331b575b6040528160406132f16110ae565b91600092838152836020820152838382015283606082015283608082015281528260208201520152565b61332361107e565b6132e3565b906133356128f7836117ec565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061336382946117ec565b019060005b82811061337457505050565b60209061337f6132c7565b82828501015201613368565b5063d5da9a1b6000526004601cfd5b929190926133a66132c7565b938051156133f557846133d89181519373ffffffffffffffffffffffffffffffffffffffff608086019616865261348a565b6060810151156133e6575050565b60006001928160208701525252565b63375c24c160005260006020526024601cfd5b929190926134146132c7565b938051156134545784613429918151936135d1565b60208401913383526040850152606081015115613444575050565b6000600192526000608082015252565b63375c24c160005260016020526024601cfd5b50637fda72796000526004601cfd5b50634e487b7160005260116020526024601cfd5b9092919260009081928290828351905b8160051b850181106134c957505050505060608293945101526134ba5750565b600114611da057610676613476565b6020909695960190602082515184518110156135c4575b60051b8401015180519060208451015160206040840151920151158251821015176135b9579060209160051b0101519660609081890151998a81019a15908b1060011b171798976000828201528b51871560011461356c57502085189060408b0151610120820151189060208c0151905118171761355f575b9061349a565b613567613467565b613559565b929061012092949750806040915185526020810151602086015201516040840152805160208d0152015160408b01522092602085018281186135af575b50613559565b82519052386135a9565b505050959495613559565b6135cc613467565b6134e0565b9092919260009081928291808051600590811b82015b8084106136035750505050505060608293945101526134ba5750565b6020979697809401938085515187518110156136cf575b841b8701015190808651015191606092828483510151920151158251821015176136c3576000918391871b010151928301998a519b8c81019c15908d1060011b17179a99528b51881560011461368357505060a0902086146135e75761367e613467565b6135e7565b8251815281830151818301526040808401519082015260808084015191015260a0909120965083018481186136b9575b506135e7565b84519052386136b3565b505050509695966135e7565b6136d7613467565b61361a565b9092938151936136eb856128ea565b956136f46111a8565b9180519060005b8281106138ca5750505060005b86811061379a57505061371a90612105565b478061378a575b50613734575b5050506107ad6001600055565b60005b8381106137445750613727565b8061375a61375460019388612988565b51151590565b613765575b01613737565b6137856137728285612988565b518561377e8482612988565b5191615aab565b61375f565b6137949033611d62565b38613721565b6137a48186612988565b516137c461300260208301516effffffffffffffffffffffffffffff1690565b156138b4576137dc6137d6838b612988565b60019052565b51604081015180519060005b82811061384c575050506060809101519081519160005b83811061381457505050506001905b01613708565b8061382160019284612988565b5160a08582019182518061383b575b5001519052016137ff565b61384690858b613944565b38613830565b8061385960019284612988565b51608060608201918251613872575b01519052016137e8565b608081018051908b90526138ab8c61389e8b5173ffffffffffffffffffffffffffffffffffffffff1690565b6101208c0151908561395b565b82820152613868565b508060006138c46001938b612988565b5261380e565b80613925866138db60019486612988565b5180519081516138ea816106a8565b6138f3816106a8565b1561392b575b604061391c602083015173ffffffffffffffffffffffffffffffffffffffff1690565b9101519161395b565b016136fb565b47606083015111156138f95761393f611d22565b6138f9565b63a5f542086000526020526040526060526064601cfd5b9291908351613969816106a8565b613972816106a8565b613a1557505050806139ba6139a1602061067694015173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff6040830151911617613a08575b60606139ff608083015173ffffffffffffffffffffffffffffffffffffffff1690565b91015190611d62565b613a10611d53565b6139dc565b60018451613a22816106a8565b613a2b816106a8565b03613aab5792610676936040820151613a9e575b602082015173ffffffffffffffffffffffffffffffffffffffff169073ffffffffffffffffffffffffffffffffffffffff6060613a93608086015173ffffffffffffffffffffffffffffffffffffffff1690565b940151931691611dae565b613aa6611d53565b613a3f565b60028451613ab8816106a8565b613ac1816106a8565b03613b2e5783613aeb602061067696015173ffffffffffffffffffffffffffffffffffffffff1690565b608082015173ffffffffffffffffffffffffffffffffffffffff169273ffffffffffffffffffffffffffffffffffffffff60606040850151940151941691611efe565b83613b53602061067696015173ffffffffffffffffffffffffffffffffffffffff1690565b608082015173ffffffffffffffffffffffffffffffffffffffff169273ffffffffffffffffffffffffffffffffffffffff60606040850151940151941691611fff565b9193929081613ba89184519085612c63565b9190805160051b604001937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082018051907f4b9f2d36e1b4c93de62cc077b00b1a91d84b6c31b4a14e012718dcca230689e760209788835282a152865196613c0f88613328565b9560009889915b818310613c44575050505093613c359487829798613c39575b506136dc565b5090565b825103825238613c2f565b9091929988613c6585613c57818f612988565b518581519101519089613cba565b613c7e8180516080602082511515930151910151141690565b15613c975750506001809101935b019190999299613c16565b8591613cb491613cad8560019699038093612988565b528b612988565b50613c8c565b909192613cc56132c7565b938351158015613eaf575b613ea2575b613cdd6132c7565b90613ce98282866135d1565b81519460609384870193845115613e82575092859288836107ad9996613d168360809a97613e199c61348a565b613d208351612fad565b613d29816106a8565b885190613d35826106a8565b613d3e826106a8565b60ff85519273ffffffffffffffffffffffffffffffffffffffff8c604080613d806139a160208a015173ffffffffffffffffffffffffffffffffffffffff1690565b613da46139a1602086015173ffffffffffffffffffffffffffffffffffffffff1690565b189701519101511894169218161717613e73575b50835182518601511015613e3957505090602083613ded613ddb613dfa9561296e565b5193518c518301518551910397612988565b5151015191015190612988565b5101525b015173ffffffffffffffffffffffffffffffffffffffff1690565b60808351019073ffffffffffffffffffffffffffffffffffffffff169052565b8495939492509060206040613ded85613e54613e659661296e565b519451015188518551910397612988565b510152519086510152613dfe565b613e7c90613eb8565b38613db8565b9750505050505050608060009182602085015201526107ad815160019052565b613eaa613ec9565b613cd5565b50805115613cd0565b63bced929d6000526020526024601cfd5b506398e9db6e6000526004601cfd5b613ee06110fb565b90600182528160005b60209081811015613f0b57602091613eff612840565b90828501015201613ee9565b505050565b92613faa613f7692613fe295613f4060046080835101516005811015613ff1575b613f3a81612934565b14614f6c565b613f8884613f4d83614414565b9098829a9296613f5b613ed8565b96613f658861296e565b52613f6f8761296e565b5086612fb7565b613f7f8561296e565b51519889613ffe565b613fa4613f936128d4565b9183613f9e8461296e565b5261296e565b51615aab565b815173ffffffffffffffffffffffffffffffffffffffff16602083015173ffffffffffffffffffffffffffffffffffffffff16612a9a565b613fec6001600055565b600190565b613ff9610678565b613f31565b60a08082015160c08301519796909593916140176111a8565b9689604086019384515190600095865b8c898d86841061411757505050505050505060809260048487015161404b81612934565b101661410a575b6060809501968751519760005b89811061408e575050505050505050505061407b919250612105565b47806140845750565b6106769033611d62565b806140ea8c8f8b8b8b8f936140bf908c8c6140ac60019c8e51612988565b51968701958651958801958651906141c0565b8092528b830151905281516140d3816106a8565b6140dc816106a8565b156140f0575b50339061395b565b0161405f565b47106140fd575b386140e2565b614105611d22565b6140f7565b614112612f94565b614052565b998561417e9392869798999c6141596141338860019a51612988565b51948551614140816106a8565b15179e8d60608701938451956080890196875190614189565b9052528c61012061391c825173ffffffffffffffffffffffffffffffffffffffff1690565b01908d939291614027565b90939084810361419f5750506107ad9350612f61565b93836141b46107ad97966141ba949686612f61565b93612f61565b90612ea3565b9093908481036141d65750506107ad9350612f61565b93836141b46107ad97966141eb949686612f61565b90612eef565b90815180825260208080930193019160005b828110614211575050505090565b909192938260a08261422660019489516106ba565b01950193929101614203565b929094939160409182519460809182870191875273ffffffffffffffffffffffffffffffffffffffff94856020921682890152838189015286518093528160a089019701936000915b8483106142c95750505050505082828594936142c493867f9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f319896036060870152169716956141f1565b0390a3565b90919293949784836001928b5180516142e1816106a8565b8252808401518c168483015285810151868301526060908101519082015201990195949301919061427b565b9092916000938285526002602052604085209283549260ff8460081c166143ef576effffffffffffffffffffffffffffff8460101c166143de5760ff841615614374575b505071010000000000000000000000000000010001909255509091506106769050565b6143806128f78261115f565b9281845236828201116143da579262010001949261067697986020846143d2957fffffffffffffffffffffffffffffff0000000000000000000000000000000000988387013784010152608435615199565b918594614351565b8780fd5b5063ee9e0e6386526020526024601cfd5b50631a51557486526020526024601cfd5b90805b61440b575090565b80910680614403565b80519061442d61099960a084015160c085015190615184565b61465b576effffffffffffffffffffffffffffff92602092848484015116938560408501511693608083016004815161446581612934565b61446e81612934565b146146285786158688111761461b575b519161448983612934565b6001809316158688101661460e575b6144a184614762565b976144b6896000526002602052604060002090565b946144c4610999878c6158f0565b6145ff578554938a60ff8616156145cb575b5050508260881c848115906144f8575b505050508460881b9060101b17179055565b98979893909192936145bb5760101c82168885146145a757818914614589578882910297029702958701968688118789030280910397039181871182841117614543575b80806144e6565b9095919661455a614554848a614400565b82614400565b80150180809204980492049580871190831117614577578061453c565b601190634e487b71600052526024601cfd5b925050508495940194848611858703028091039503388080806144e6565b9397509550505083039383388080806144e6565b50505050839493388080806144e6565b60606145ee6145f7945173ffffffffffffffffffffffffffffffffffffffff1690565b92015191615199565b38808a6144d6565b50600097508796505050505050565b6146166147ce565b614498565b6146236147bf565b61447e565b50919360809396506001915061464795021861464e575b0151906147dd565b9192909190565b6146566147bf565b61463f565b5050600090600090600090565b80519061468561099960a084015160c08501514210904210151690565b61465b576effffffffffffffffffffffffffffff9260209284848401511693856040850151169360808301600481516146bd81612934565b6146c681612934565b1461473657861586881117614729575b51916146e183612934565b6001809316158688101661471c575b6146f984614762565b9761470e896000526002602052604060002090565b946144c4610999878c615953565b6147246147ce565b6146f0565b6147316147bf565b6146d6565b509193608093965060019150614647950218614755575b01519061499c565b61475d6147bf565b61474d565b6060810151516101408201511161153d57806147b973ffffffffffffffffffffffffffffffffffffffff6107ad93511673ffffffffffffffffffffffffffffffffffffffff16600052600160205260406000205490565b90612423565b50635a052b326000526004601cfd5b5063a11b63ff6000526004601cfd5b60609060408282018051516101408401510361498f575b60008061481f614818865173ffffffffffffffffffffffffffffffffffffffff1690565b9786614b6b565b9082895af19361484f8673ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b958654906001978883019055821b189415614981575b61486d615dcd565b9490919586614973575b0180515182518111614965575b6000905b8981831061492f575050505281519083519180518311614921575b91906000925b888385106148ce575050505050526148c057918190565b6148c981614c57565b918190565b90919293966148dd8884612988565b516149156148eb8a8a612988565b518681015187840151106148ff8285614c77565b179260a080910151910151908091149015171590565b171796019291906148a9565b61492a87614c57565b6148a3565b90919761493d898551612988565b5161495b61494b8b88612988565b5188830151898201511092614c77565b1717970190614888565b61496e88614c57565b614884565b61497c88614c57565b614877565b61498a85614c57565b614865565b614997614c68565b6147f4565b60609081810180515161014083015103614b03575b6149d96149d2835173ffffffffffffffffffffffffffffffffffffffff1690565b9483614b6b565b9060008092819282895af193614a0f8673ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b958654906001978883019055821b189415614af9579060409291614a31615dcd565b9590919687614aeb575b0180515182518111614add575b84905b8a818310614ab75750505052825184519281518411614aa9575b9291905b88838510614a80575050505050526148c057918190565b9091929396614a8f8884612988565b51614a9d6148eb8a8a612988565b17179601929190614a69565b614ab288614c57565b614a65565b909198614ac58a8551612988565b51614ad361494b8c88612988565b1717980190614a4b565b614ae689614c57565b614a48565b614af489614c57565b614a3b565b5093505050918190565b614b0b614c68565b6149b1565b91909160408051936020928360e083028701018352818652839160010160051b92838701915b848410614b4557505050505050565b60c060a0879285878c01528460808083893e606083019088013e01930193019291614b36565b9190608490614bd2604051916398919765835260a0601c84019633602086015260806040860152614bbe6060614ba8604084015185890190614bfc565b9283608001828901520151838388010190614bfc565b018094608082016080820152010190614bd7565b010190565b8051603f0163ffffffe0169291610676918491905b829060045afa153d15176101c357565b9081519081815260209283808083019301918460051b0101915b84838210614c29575050505060071b0190565b8160809251805185528281015183860152604080820151908601526060809101519085015201910190614c16565b63939792856000526020526024601cfd5b50632165628a6000526004601cfd5b90815191604081015180156003851116614cb4575b6020809160608401516080850151149060408601511416948451149301519101511416161590565b506040820151600490931460030392614c8c565b9190811015614d09575b60051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea1813603018212156101c3570190565b614d1161293e565b614cd2565b3560058110156101c35790565b5063fed398fc6000526004601cfd5b90815180825260208080930193019160005b828110614d52575050505090565b909192938260a060019287518051614d69816106a8565b82528084015173ffffffffffffffffffffffffffffffffffffffff168483015260408082015190830152606080820151908301526080908101519082015201950193929101614d44565b90815180825260208080930193019160005b828110614dd3575050505090565b909192938260c060019287518051614dea816106a8565b82528084015173ffffffffffffffffffffffffffffffffffffffff9081168584015260408083015190840152606080830151908401526080808301519084015260a091820151169082015201950193929101614dc5565b906005821015614e4e5752565b61221e610678565b90815260406020820152614e8360408201835173ffffffffffffffffffffffffffffffffffffffff169052565b602082015173ffffffffffffffffffffffffffffffffffffffff1660608201526101806040830151614efa614ec6610160928360808701526101a0860190614d32565b60608601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08683030160a0870152614db3565b93614f0d608082015160c0860190614e41565b60a081015160e085015260c081015191610100928386015260e082015192610120938487015282015192610140938487015282015190850152015191015290565b614f56614f7c565b6002600055565b614f65614f7c565b6003600055565b614f74614f7c565b600201600055565b600160005403614f8857565b637fa8a9876000526004601cfd5b600360005403614fa257565b61067634611d42565b929091833b1561507857604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652816004528260245283604452858060648180855af1156150055750505050604052606052565b85853d61502c575b5063f486bc879052602052604052606052608052600160a05260a4601cfd5b601f3d0160051c9060051c90806003029180821161505f575b505060205a910110615057578561500d565b3d81803e3d90fd5b8080600392028380020360091c92030201018680615045565b83635f15d6726000526020526024601cfd5b9392919091843b1561517257604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528160045282602452836044528460645260a06084528960a452898060c48180855af11561510957505050505060805260a05260c052604052606052565b89893d61512e575b5063f486bc87905260205260405260605260805260a05260a4601cfd5b601f3d0160051c9060051c908060030291808211615159575b505060205a9101106150575786615111565b8080600392028380020360091c92030201018780615147565b84635f15d6726000526020526024601cfd5b9190428111428411151692831561154b575050565b92919033841461531a576151ab6125a7565b936151e882867f19010000000000000000000000000000000000000000000000000000000000006000526002526022526042600020906000602252565b908351926002601f601d860116106102e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9d8601101660001461530c5760018085169081604103927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf600593880101831c93808952880160209384820151928560238560e81c94019460e31c1690815285845191185283925b8684106152ec575050505050966152e69161067697986152a5604060002092615514565b600052526040600020907f19010000000000000000000000000000000000000000000000000000000000006000526002526022526042600020906000602252565b90615320565b85859101938684821c841b16604060002081528786519118520192615281565b506106769495508190615320565b50509050565b909291926000948580528051957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0820180519188604103908091600181119687156154aa575b50505085148515151697881561539c575b50505050505050501561538657565b61538e612681565b634f7fb80d6000526004601cfd5b909192939495809798508452604082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8401938451957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08201976020600060648b519c7f1626ba7e000000000000000000000000000000000000000000000000000000009e8f8c528d520189845afa9a8b615448575b50505050505252523880808080808080615377565b600051036154565780615433565b3b61538e5761549c57606001906041640101000000835160001a1a159114166154875763815e1d646000526004601cfd5b631f003d0a6000525160001a6020526024601cfd5b638baa579f6000526004601cfd5b9091925060408601908151926060880151851a906154e2575b8752845260208360808660015afa508484528a86525251388080615366565b50601b8360ff1c017f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841683526154c3565b600981106157ac576011811061566857601581106155ca576017811061557f5760177f403be09941a31d05cfc2f896505811353d45d38743288b016630cce39435476a9114027f1d51df90cba8de7637ca3e8fe1e3511d1dc2f23487d05dbdecb781860c21ac1c1890565b60157fbb40bf8cea3a5a716e2b6eb08bbdac8ec159f82f380783db3c56904f15a43d049114027f3bd8cff538aba49a9c374c806d277181e9651624b3e31111bc0624574f8bca1d1890565b6013811061561d5760137f54b3212a178782f104e0d514b41a9a5c4ca9c980bf6597c3cecbf280917e202a9114027f5a4f867d3d458dabecad65f6201ceeaba0096df2d0c491cc32e6ea4e643500171890565b60117f2d7a3ed6dab270fdb8e054b2ad525f0ce2a8b89cc76c17f0965434740f673a559114027fc3939feff011e53ab8c35ca3370aad54c5df1fc2938cd62543174fa6e7d858771890565b600d811061570e57600f81106156c357600f7fcc4886e37eedd9aacd6c1c2c9247197a621a71282e87a7cbc673f3736d9aa1419114027f1da3eed3ecef6ebaa6e5023c057ec2c75150693fd0dac5c90f4a142f9879fde81890565b600d7f8df51df98847160517f5b1186b4bc3f418d98b8a7f17f1292f392d79d600d79e9114027f6b5b04cbae4fcb1a9d78e7b2dfc51a36933d023cf6e347e03d517b472a8525901890565b600b811061576157600b7f32f4e7485d6485f9f6c255929b9905c62ba919758bbe231f231eaeecf33d810c9114027fbb98d87cc12922b83759626c5f07d72266da9702d19ffad6a514c73a89002f5f1890565b60097f6f0ec38c21f6f583ab7f3c5413c773ffd5344c34fde1d390958e438bf667448f9114027fd1d97d1ef5eaa37a4ee5fbf234e6f6d64eb511eb562221cd7edfbdde0848da051890565b6005811061585257600781106158075760077fb58d772fb09b426b9dece637f61ca9065f2b994f1464b51e9207f55f7c8f59489114027f7ff98d9d4e55d876c5cfac10b43c04039522f3ddfb0ea9bfe70c68cfb5c7cc141890565b60057f25d02425402d882d211a7ab774c0ed6eca048c4d03d9af40132475744753b2a39114027f1c19f71958cdd8f081b4c31f7caf5c010b29d12950be2fa1c95070dc47e30b551890565b600381106158a55760037ff3e8417a785f980bdaf134fa0274a6bf891eeb8195cd94b09d2aa651046e28bc9114027fa02eb7ff164c884e5e2c336dc85f81c6a93329d8e9adf214b32729b894de2af11890565b60017f832c58a5b611aadcfa6a082ac9d04bace53d8278387f10040347b7e98eb5b3029114027fbf8e29b89f29ed9b529c154a63038ffca562f8d7cd1e2545dda53a1b582dde301890565b905460ff8160081c16615941576effffffffffffffffffffffffffffff8160101c169081615921575b505050600190565b60881c1115615932575b8080615919565b61593b906159bb565b3861592b565b50631a5155746000526020526024601cfd5b906000905460ff8160081c166159b2576effffffffffffffffffffffffffffff8160101c169081615988575b50505050600190565b60881c111561599857808061597f565b6159a3575b50600090565b6159ac906159bb565b3861599d565b50905050600090565b6310fda3e16000526020526024601cfd5b9190608082019081356159de8161064b565b33141590600460018211911016166159f557505050565b61067692615a236139a16060604051956317b1f94287526020808801528460408801523382880152016111bf565b6080840152606061014461012085013761014060a08401526101e060c0840152615aa6601c61032461026435615a6f60a08202918261016001906101808a019060051b61020001614bec565b6102a0810160e08801528461032082890160006102e08201526102c084016101008b015260016103008201520152019401926111bf565b615d11565b919082519060808201918251926005841015615b66575b615af3602083019473ffffffffffffffffffffffffffffffffffffffff865116331415906004600182119110161690565b15615b1b575090615b0d9160806106769601519085615bf7565b91519263fb5014fc93615d79565b60049194935051615b2b81612934565b615b3481612934565b03615b605761067693615b549184519460808660601b9301519085615b73565b91639397928593615d79565b50505050565b615b6e610678565b615ac2565b9493919260c060a494615be3614bd2946040519663f4dd92ce8852601c88019a1860a088015260a06020880152615bcd6060615bb66040840151878b0190614bfc565b928360a00160408b0152015185838a010190615cc9565b019160a083016060880152838388010190614bd7565b01809460a082016080820152010190615cad565b9392614bd2906101649392604051936317b1f9428552601c85019760208087015260408601523360608601528151608086015260a082015161012086015260c082015190610140918287015260e08301516101608701528160a0870152615c9d604084015193615c886060615c7261018097888c0190614bfc565b9283870160c08c0152015186838b010190615cc9565b019183830160e0890152848389010190614bd7565b0194859182016101008201520101905b612984602092839283815180845260051b948593019101614bec565b8051908183526020928380808401938560051b01019101915b818110615cf35750505060a0020190565b60a090818481835160045afa153d15176101c3578501920191615ce2565b6020909391937fffffffff00000000000000000000000000000000000000000000000000000000845116926000948580938180525af1908251149015615d6a5715615d5a575050565b63fb5014fc90526020526024601cfd5b5063fb5014fc90612230612681565b602090949391947fffffffff00000000000000000000000000000000000000000000000000000000845116926000948580938180525af1908251149015615dc4571561223057505050565b50612230612681565b60009081906080803d109060009081908280918515615e70575b8515615df8575b5050505050929190565b91939750919550602094939480920196604051918360c08302840101604052818352839160010160051b98898401905b8a8410615e4d5750505050615e4293949596509501614b10565b913880808080615dee565b60a083879284878901528181863e60608501518286015201920193019290615e28565b9450909150604081803e5190602051913d81113d8411179485615de75794508093506020915060003e60005191602082813e602051903d8260a0028560071b0186011161ffff83861711179460008052615de7565b908135641fffffffe08160051b169060405191602091828285010160405263ffffffff809116845260005b828110615f005750929450505050565b80615f1685848180958c010135168a01016119cd565b82828801015201615ef056fea164736f6c6343000811000a

Results in the following error

thread 'inspect_contract_data' panicked at 'attempt to add with overflow', src/vm/state/memory.rs:163:49

Expected Behaviour

No overflow should happen.

iamrecursion commented 1 year ago

So this is a legitimate overflow in that the offset in the load_slice function is huge. That means that we very rapidly overflow usize::max.

However, this should be impossible to do in a valid contract. To expand memory to usize::max bytes would take more gas than the block gas limit as far as I can tell, which means that the expression we are getting as input is potentially bogus.

I don't have more time to investigate this for now, but some thoughts: