Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/objects.cc

Issue 12916005: Add instrumentation to track down Code::CopyFrom crasher. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 8798 matching lines...) Expand 10 before | Expand all | Expand 10 after
8809 } 8809 }
8810 8810
8811 8811
8812 void Code::CopyFrom(const CodeDesc& desc) { 8812 void Code::CopyFrom(const CodeDesc& desc) {
8813 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); 8813 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT);
8814 8814
8815 // copy code 8815 // copy code
8816 memmove(instruction_start(), desc.buffer, desc.instr_size); 8816 memmove(instruction_start(), desc.buffer, desc.instr_size);
8817 8817
8818 // copy reloc info 8818 // copy reloc info
8819 // TODO(mstarzinger): Remove once we found the bug.
8820 CHECK(relocation_info()->IsByteArray());
8819 memmove(relocation_start(), 8821 memmove(relocation_start(),
8820 desc.buffer + desc.buffer_size - desc.reloc_size, 8822 desc.buffer + desc.buffer_size - desc.reloc_size,
8821 desc.reloc_size); 8823 desc.reloc_size);
8822 8824
8823 // unbox handles and relocate 8825 // unbox handles and relocate
8824 intptr_t delta = instruction_start() - desc.buffer; 8826 intptr_t delta = instruction_start() - desc.buffer;
8825 int mode_mask = RelocInfo::kCodeTargetMask | 8827 int mode_mask = RelocInfo::kCodeTargetMask |
8826 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 8828 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
8827 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) | 8829 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) |
8828 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) | 8830 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) |
(...skipping 5497 matching lines...) Expand 10 before | Expand all | Expand 10 after
14326 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 14328 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
14327 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 14329 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
14328 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 14330 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
14329 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 14331 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
14330 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 14332 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
14331 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 14333 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
14332 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 14334 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
14333 } 14335 }
14334 14336
14335 } } // namespace v8::internal 14337 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698