Changeset 188311 in webkit
- Timestamp:
- Aug 11, 2015 4:50:02 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r188299 r188311 1 2015-08-11 Alexey Proskuryakov <ap@apple.com> 2 3 Make ASan build not depend on asan.xcconfig 4 https://bugs.webkit.org/show_bug.cgi?id=147840 5 rdar://problem/21093702 6 7 Reviewed by Daniel Bates. 8 9 * dfg/DFGOSREntry.cpp: 10 (JSC::DFG::OSREntryData::dump): 11 (JSC::DFG::prepareOSREntry): 12 * ftl/FTLOSREntry.cpp: 13 (JSC::FTL::prepareOSREntry): 14 * heap/ConservativeRoots.cpp: 15 (JSC::ConservativeRoots::genericAddPointer): 16 (JSC::ConservativeRoots::genericAddSpan): 17 * heap/MachineStackMarker.cpp: 18 (JSC::MachineThreads::removeThreadIfFound): 19 (JSC::MachineThreads::gatherFromCurrentThread): 20 (JSC::MachineThreads::Thread::captureStack): 21 (JSC::copyMemory): 22 * interpreter/Register.h: 23 (JSC::Register::operator=): 24 (JSC::Register::asanUnsafeJSValue): 25 (JSC::Register::jsValue): 26 1 27 2015-08-11 Yusuke Suzuki <utatane.tea@gmail.com> 2 28 -
trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
r186691 r188311 91 91 } 92 92 93 SUPPRESS_ASAN 93 94 void* prepareOSREntry(ExecState* exec, CodeBlock* codeBlock, unsigned bytecodeIndex) 94 95 { … … 203 204 int localOffset = virtualRegisterForLocal(local).offset(); 204 205 if (entry->m_localsForcedDouble.get(local)) { 205 if (!exec->registers()[localOffset]. jsValue().isNumber()) {206 if (!exec->registers()[localOffset].asanUnsafeJSValue().isNumber()) { 206 207 if (Options::verboseOSR()) { 207 208 dataLog( 208 209 " OSR failed because variable ", localOffset, " is ", 209 exec->registers()[localOffset]. jsValue(), ", expected number.\n");210 exec->registers()[localOffset].asanUnsafeJSValue(), ", expected number.\n"); 210 211 } 211 212 return 0; … … 214 215 } 215 216 if (entry->m_localsForcedMachineInt.get(local)) { 216 if (!exec->registers()[localOffset]. jsValue().isMachineInt()) {217 if (!exec->registers()[localOffset].asanUnsafeJSValue().isMachineInt()) { 217 218 if (Options::verboseOSR()) { 218 219 dataLog( 219 220 " OSR failed because variable ", localOffset, " is ", 220 exec->registers()[localOffset]. jsValue(), ", expected ",221 exec->registers()[localOffset].asanUnsafeJSValue(), ", expected ", 221 222 "machine int.\n"); 222 223 } … … 225 226 continue; 226 227 } 227 if (!entry->m_expectedValues.local(local).validate(exec->registers()[localOffset]. jsValue())) {228 if (!entry->m_expectedValues.local(local).validate(exec->registers()[localOffset].asanUnsafeJSValue())) { 228 229 if (Options::verboseOSR()) { 229 230 dataLog( 230 231 " OSR failed because variable ", localOffset, " is ", 231 exec->registers()[localOffset]. jsValue(), ", expected ",232 exec->registers()[localOffset].asanUnsafeJSValue(), ", expected ", 232 233 entry->m_expectedValues.local(local), ".\n"); 233 234 } … … 281 282 if (reg.isLocal()) { 282 283 if (entry->m_localsForcedDouble.get(reg.toLocal())) { 283 *bitwise_cast<double*>(pivot + index) = exec->registers()[reg.offset()]. jsValue().asNumber();284 *bitwise_cast<double*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asNumber(); 284 285 continue; 285 286 } 286 287 287 288 if (entry->m_localsForcedMachineInt.get(reg.toLocal())) { 288 *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()]. jsValue().asMachineInt() << JSValue::int52ShiftAmount;289 *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asMachineInt() << JSValue::int52ShiftAmount; 289 290 continue; 290 291 } 291 292 } 292 293 293 pivot[index] = exec->registers()[reg.offset()]. jsValue();294 pivot[index] = exec->registers()[reg.offset()].asanUnsafeJSValue(); 294 295 } 295 296 … … 297 298 Vector<JSValue> temporaryLocals(entry->m_reshufflings.size()); 298 299 for (unsigned i = entry->m_reshufflings.size(); i--;) 299 temporaryLocals[i] = pivot[VirtualRegister(entry->m_reshufflings[i].fromOffset).toLocal()]. jsValue();300 temporaryLocals[i] = pivot[VirtualRegister(entry->m_reshufflings[i].fromOffset).toLocal()].asanUnsafeJSValue(); 300 301 for (unsigned i = entry->m_reshufflings.size(); i--;) 301 302 pivot[VirtualRegister(entry->m_reshufflings[i].toOffset).toLocal()] = temporaryLocals[i]; -
trunk/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
r172129 r188311 39 39 namespace JSC { namespace FTL { 40 40 41 SUPPRESS_ASAN 41 42 void* prepareOSREntry( 42 43 ExecState* exec, CodeBlock* dfgCodeBlock, CodeBlock* entryCodeBlock, … … 72 73 73 74 for (int argument = values.numberOfArguments(); argument--;) { 74 JSValue valueOnStack = exec->r(virtualRegisterForArgument(argument).offset()). jsValue();75 JSValue valueOnStack = exec->r(virtualRegisterForArgument(argument).offset()).asanUnsafeJSValue(); 75 76 JSValue reconstructedValue = values.argument(argument); 76 77 if (valueOnStack == reconstructedValue || !argument) -
trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp
r164500 r188311 93 93 94 94 template<typename MarkHook> 95 SUPPRESS_ASAN 95 96 void ConservativeRoots::genericAddSpan(void* begin, void* end, MarkHook& markHook) 96 97 { -
trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp
r188169 r188311 336 336 } 337 337 } 338 338 339 SUPPRESS_ASAN 339 340 void MachineThreads::gatherFromCurrentThread(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks, void* stackOrigin, void* stackTop, RegisterState& calleeSavedRegisters) 340 341 { … … 520 521 } 521 522 523 SUPPRESS_ASAN 522 524 static void copyMemory(void* dst, const void* src, size_t size) 523 525 { -
trunk/Source/JavaScriptCore/interpreter/Register.h
r183935 r188311 52 52 Register& operator=(const JSValue&); 53 53 JSValue jsValue() const; 54 JSValue asanUnsafeJSValue() const; 54 55 EncodedJSValue encodedJSValue() const; 55 56 … … 111 112 } 112 113 114 // FIXME (rdar://problem/19379214): ASan only needs to be suppressed for Register::jsValue() when called from prepareOSREntry(), but there is currently no way to express this short of adding a separate copy of the function. 115 SUPPRESS_ASAN ALWAYS_INLINE JSValue Register::asanUnsafeJSValue() const 116 { 117 return JSValue::decode(u.value); 118 } 119 113 120 ALWAYS_INLINE JSValue Register::jsValue() const 114 121 { -
trunk/Source/WTF/wtf/Compiler.h
r187819 r188311 138 138 #endif 139 139 140 #if ASAN_ENABLED 141 #define SUPPRESS_ASAN __attribute__((no_sanitize_address)) 142 #else 143 #define SUPPRESS_ASAN 144 #endif 145 140 146 /* ==== Compiler-independent macros for various compiler features, in alphabetical order ==== */ 141 147 -
trunk/Tools/ChangeLog
r188310 r188311 1 2015-08-11 Alexey Proskuryakov <ap@apple.com> 2 3 Make ASan build not depend on asan.xcconfig 4 https://bugs.webkit.org/show_bug.cgi?id=147840 5 rdar://problem/21093702 6 7 Reviewed by Daniel Bates. 8 9 * asan/asan.xcconfig: 10 * asan/webkit-asan-ignore.txt: Removed. It's no longer needed, as unsafe functions 11 are now marked in source code. 12 1 13 2015-08-11 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Tools/asan/asan.xcconfig
r184862 r188311 13 13 CLANG_ADDRESS_SANITIZER=YES 14 14 15 ASAN_OTHER_CFLAGS = -f sanitize-blacklist=$(ASAN_IGNORE) -fno-omit-frame-pointer -g;15 ASAN_OTHER_CFLAGS = -fno-omit-frame-pointer -g; 16 16 ASAN_OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CFLAGS); 17 17
Note: See TracChangeset
for help on using the changeset viewer.