summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-08-25Replace MAX_PATH with new defines.Lakshmi Priya Sekar3-4/+4
2015-08-24Merge pull request #1381 from JeremyKuhne/maxpathJeremy Kuhne27-118/+144
Run code under long paths on Unix
2015-08-24Run code under long paths on UnixJeremy Kuhne27-118/+144
This change allows the happy path for a simple corerun Hello World app. This is pretty close to the bare minimum needed to run. Adds a MAX_LONGPATH define for long paths and MAX_PATH_FNAME to use for places where MAX_PATH is used for something that is trully 260 characters (usually file names).
2015-08-24Fix bug 1213453 (GitHub issue #1421): incorrect EH scopes for optimized loopsBruce Forstall2-0/+16
(Port changeset 1518001 from CodeGen) The bug occurs when fgOptWhileLoop() duplicates a condition from one 'try' region into another, and that condition throws an exception, such as for an array bounds check. This was the test case: try { Console.WriteLine("try"); } catch (IndexOutOfRangeException) { Console.WriteLine("bad"); result = FAIL; } while (a[42] != 0) {} Before the fix, the "a[42] != 0" condition was duplicated into the 'try' region, thus causing an IndexOutOfRange exception to be thrown, and caught in the wrong region. The main fix is to compare the 'try' region of the region where the condition exists and the region we intend to copy it to. The other changes, in optimizer.cpp and flowgraph.cpp, are "defense in depth" -- to be more careful with EH checks in two very similar optimizations. This bug existed in AMD64 and ARM32. There are 2 functions with ARM32 asm diffs. There are 70 functions with AMD64 SuperAsm diffs. There are many cases where we prohibit the optimization that caused the bug. There are a few cases where we don't do the optimization but could have if we were more careful about checking for precise EH conditions that are allowed, namely, that branching to the first block of a 'try' region is ok. [tfs-changeset: 1518014]
2015-08-22Merge pull request #1423 from mikem8361/gcrootMike McLaughlin39-393/+439
Enable gcroot and other gc related sos commands.
2015-08-22Enable gcroot and other gc related sos commands.Mike McLaughlin39-393/+439
The "gcroot" command currently doesn't work with lldb 3.6 (our default package), but works fine with lldb 3.7.0. lldb 3.6 terminates with (lldb) sos GCRoot 00007fffcc004ce8 *** Error in `lldb-3.6': munmap_chunk(): invalid pointer: 0x000000000184cde8 *** PAL_STDCPP_COMPAT is the define that the VS team added to allow the xplat headers to be used. This is neccessary for the whole SOS directory now because gcroot and other gc commands need unorderd_map, unorderd_set, etc. from the stdlib. Had to change all wchar_t to WCHAR because the xplat stdlib default is UTF32. Had to rename and provide macros that conflict with the stdlib: wcslen -> _wcslen wcsncmp -> _wcsncmp wcsrchr -> _wcsrchr wcscmp -> _wcscmp wcschr -> _wcschr wcscspn -> _wcscspn wcscat -> _wcscat __in -> ___in __out -> ___out max(a, b) -> _max(a, b) min(a, b) -> _min(a, b) Had to ifdef PAL_STDCPP_COMPAT a lot more of pal.h, palrt.h and some other header files. Changed a bunch of L"" to W("").
2015-08-21Remove Binder assertion for BindByWhereRefAndrew Schwartzmeyer1-8/+0
Some use cases of CoreCLR require overriding the assembly load context, triggering this assertion. However, this override does not necessarily break support of BindByWhereRef, and so it should be attempted on a best-effort basis, instead of bailing out prematurely.
2015-08-20Merge pull request #1416 from jkotas/vs2015-autodetectJan Kotas3-2/+17
Auto-detect VS2015
2015-08-20Use volatile stores for values read by DACJan Kotas3-2/+17
VS2015 optimizer is smart enough to optimize out stores into globals that are only read by the DAC.
2015-08-20Merge pull request #1413 from jkotas/atypical-callsiteJan Kotas4-18/+74
Add CORINFO_CALLINFO_ATYPICAL_CALLSITE flag to JIT-EE interface
2015-08-19Complete support for atypical callsitesJan Kotas4-17/+72
2015-08-19Merge pull request #1415 from jkotas/acceptable-time-errorJan Kotas3-15/+9
Fix timing in more PAL tests for FreeBSD on hypervisors
2015-08-19Merge pull request #1410 from jkotas/vs2015-buildtoolsJan Kotas2-2/+2
Update buildtools version to fix VS2015 build
2015-08-19Fix timing in more PAL tests for FreeBSD on hypervisorsJan Kotas3-15/+9
2015-08-18Update buildtools version to 00079Jan Kotas2-2/+2
Required by VS2015
2015-08-18Merge pull request #1412 from nguerrera/remove-old-corefxpalNick Guerrera14-719/+0
Remove PAL code that has been moved to the corefx repo
2015-08-18Add CORINFO_CALLINFO_ATYPICAL_CALLSITE flag to JIT-EE interfaceJan Kotas2-1/+2
CORINFO_CALLINFO_ATYPICAL_CALLSITE is meant to be used in situations where the code generator cannot guarantee that the callsite can be disassembled by delay load helper (e.g. it is not call [rel32] on x86/x64)
2015-08-18Remove PAL code that has been moved to the corefx repoNick Guerrera14-719/+0
2015-08-18Merge pull request #1397 from eerhardt/masterEric Erhardt2-9/+36
Handle newer tzfiles by allowing for the "big bang" transition.
2015-08-18Handle newer tzfiles by allowing for the "big bang" transition.Eric Erhardt2-9/+36
In the TZ release 2014c, a new "big bang" transition time was added to the beginning of the tzfiles. This broke the TimeZoneInfo parsing logic because the transition time was for 13 billion years ago, which is unrepresentable by DateTime. To handle these new transitions, check for times really far in the past and future, and use DateTime.Min/Max to represent them. Then skip over any DateTime.MinValue times when generating the AdjustmentRules. Fix https://github.com/dotnet/corefx/issues/2816.
2015-08-18TimeZoneInfo is finding the wrong AdjustmentRule on Windows.Eric Erhardt1-2/+2
TimeZoneInfo.IsAdjustmentRuleValid is no longer using the "dateOnly/whole-date" portion on Windows to check for the correct AdjustmentRule. This causes problems when converting times and determining if a time is daylight savings or not. Fix https://github.com/dotnet/corefx/issues/2821
2015-08-18Merge pull request #1405 from ellismg/build-mscorlib-on-linuxStephen Toub8-24/+35
Build mscorlib on linux
2015-08-17Build mscolrib.dll on UnixMatt Ellis7-18/+35
Initial work to get mscorlib.dll building via Roslyn + MSBuild running on top of Mono on Linux. - Use a newer version of BclRewriter.exe which works cross-platform, the major difference here is that now we need to specify the input assembly as a named argument instead (since fully qualified paths on Unix look like flags on Windows). - The ResGen we use comes from Mono, which does not support the -d flag, so we need to stop passing defines to ResGen. I know the mono folks recently did some work to address this, but long term we need to move towards getting our ResGen.exe running on CoreCLR and use that instead. - Don't require that mono is installed in order to build coreclr. If mono is not on the path, skip the build step to enable folks to do development without Mono. In this case, they will need to continue to build mscorlib.dll on Windows, targeting Unix. - Mono stability has been an issue for folks that have buddy tested this. I've found that recent mono 4.2 builds, when run with the Boehm GC work well for me. Other folks have other builds they like instead. The `skipmscorlib` flag can be passed to build.sh if you want to skip building mscorlib.dll locally.
2015-08-17Remove unused resource stringMatt Ellis1-6/+0
StackTrace_Stack was conditional between Unix and Windows, which is problematic when building on Unix, since the Mono provided ResGen does not understand our define directives. It turns out this string is unused (in both CoreCLR and Desktop) so to make things easier, we can just remove it.
2015-08-16Remove GetFileInformation stat wrapper from PALNick Guerrera5-132/+0
It has been replaced by stat shims in corefx System.Native. Reverts commits: * 79ebe5605a94d559d2996997aec3cbcf8a4504c3. * 0119283384f1bac80da8bb1736453c87d4f8e689.
2015-08-16Merge pull request #1391 from AlexGhiondea/fixProjectStephen Toub1-1/+0
Remove incorrect msbuild logic for creating relative paths
2015-08-14The newly introduced method PopulateAllSystemTimeZones was copied from a ↵Alex Ghiondea1-0/+1
method that had the SecuritySafeCritical attribute but it does not have the attribute itself. This change adds the attribute to the new method. [tfs-changeset: 1514941]
2015-08-14Merge pull request #1378 from eerhardt/masterEric Erhardt1-129/+94
Make use of TimeZoneInfo.CachedData on Linux.
2015-08-14Make use of TimeZoneInfo.CachedData on Linux.Eric Erhardt1-129/+94
Fix https://github.com/dotnet/corefx/issues/2497.
2015-08-14Merge pull request #1390 from AlexGhiondea/fix_1386AlexGhiondea1-1/+1
Rebuild the resource file when the input file changes
2015-08-14Fix typo "retrive" and "retrieved" to "retrieve" and "retrieved"Jon Hanna41-62/+62
Mostly just in comments, test case and trace text, but the exception thrown if you try to GetInterfaceMap on an array type has it in the description.
2015-08-13Remove incorrect msbuild logic for creating relative pathsAlex Ghiondea1-1/+0
The logic was using Link to try and show mscorlib sources show up in VS. Turns out the logic was both incorrect and not needed.
2015-08-13Rebuild the resource file when the input file changesAlex Ghiondea1-1/+1
When building mscorlib resources we are not taking into account the file that contains the resource strings when deciding if we need to rebuild the resources file. Becasue of this, adding/modifying a resource string will not show up in the build resource file until you delete the intermediate folder.
2015-08-13Merge pull request #1387 from stephentoub/named_primitivesJan Kotas3-9/+50
Throw PlatformNotSupported for named sync primitives on Unix
2015-08-13Throw PlatformNotSupported for named sync primitives on Unixstephentoub3-9/+50
libcoreclr's synchronization primitives implementation currently supports names, but those names have process-wide rather than system-wide scope. This is very dangerous for most code that would want names, as they're typically used for cross-process synchronization, and as such the current behavior could lead to bad race conditions difficult to diagnose. Until a better solution is available, we will throw PlatformNotSupportedException when trying to create such named primitives.
2015-08-13There was a testcase failing ↵Bryan Arant3-3/+3
(Interop\WinRT\Exception\ManagedClientNativeServer\ExceptionTest.csproj). The test checks that the HResult 0x8000000e maps to a System.InvalidOperationException. What was happening: We returned a System.COMException with the message "A method was called at an unexpected time." (we're just constructing an exception based on an HR message). What should be happening: We return a System.InvalidOperationException (i.e. we check against the exceptionKind maps for a specific HResult to map to an exception). The point of failure is in the creation of the EEMessageException. When calling GetKindFromHR(...) we were inverting the boolean that uses the WinRT mappings. Removing that inversion allows us to check the WinRT Exception Maps for exceptions. When I made this change, we correctly return the correct Exception. Test coverage: I ran a full DDR, and the whole TOF (both against my build and against the newest build). All passed successfully (i.e. no additional failures). [tfs-changeset: 1514327]
2015-08-13Merge pull request #1384 from janvorli/fix-gc-during-exception-handlingJan Vorlicek2-25/+87
Fix GC issues during exception handling on Unix
2015-08-13Fix GC issues during exception handling on UnixJan Vorlicek2-25/+87
This change fixes two issues that happens in some cases when GC scans stack of a thread that is handling exception at that moment. First issue was caused by the fact that the stack walker wasn't modified to take into account the difference in exception handling on Unix. When an exception is thrown from a catch handler or finally block (a funclet )on Unix, part of the stack is unwound immediatelly, while on Windows, the stack is not reclaimed until the exception is fully handled. The problem was caused by the fact that when GC happens in the funclet before the exception is processed, but after a point where GC knows that the lifetime of locals in the caller frame is over, it doesn't update the references in the caller frame for objects that it has relocated. On Windows, this is detected just from walking the stack, since the funclet frame is still there and the stack walker can then skip scanning the parent frame GC references. On Linux, the funclet is not on stack anymore, so this case was not detected and GC attempted to scan the stale references and crashed. The fix was to detect that a frame was a caller to a funclet from the chain of previous exception trackers that is fortunately preserved and the trackers hold the necessary information. The second issue was more subtle. During interleaved exception handling, when we unwind a native portion of the stack and switch back to unwinding a managed block of stack frames, we re-create the exception tracker and carry over just a few members necessary to continue processing the same exception. The way it was done was that we have first removed the current tracker from the list of trackers of the current thread, then we have destroyed it, created a new one and put it back to the front of the list. The issue happened when GC started walking the stack of the thread in the small time slot when the current tracker was removed from the list, but the re-created tracker was not added there yet. Then the detection necessary for handling the previous issue didn't work and we got a crash. The fix was to make the whole re-creation of the exception tracker atomic w.r.t. the GC.
2015-08-12We are incorrectly stripping away the Identity method from the EnumHelper ↵Alex Ghiondea1-0/+4
type when building mscorlib. [tfs-changeset: 1513902]
2015-08-12Build Toolbox\BinaryRewriting as part of the PK product groupMatt Ellis2-2/+4
We need this so we can get a signed build of BclRewriter.exe which is only produced by the offical build out of the ProjectK branch. [tfs-changeset: 1513878]
2015-08-12Port the DateTime parser fix from the DesktopTarek Mahmoud Sayed1-0/+56
This change is fixing the DateTime parser in cases of date/time strings for cultures which has the date and time separators are same. This happen with Norway, Serbia and Finland cultures [tfs-changeset: 1513801]
2015-08-12Merge pull request #1329 from AndreyAkinshin/masterMatt Mitchell1-0/+5
Fix a bug with disappeared cast to byte in numeric binary expressions
2015-08-12Fix a bug with disappeared cast to byte in numeric binary expressionsAndrey Akinshin1-0/+5
Lowering::IndirsAreEquivalent doesn't check if the 2 indirections have the same type and because of that a RMW style instruction is generated instead of the expected movzx rax, byte ptr [7FFA61024742h] xor eax, 33 mov word ptr [7FFA61024742h], ax This behavior was fixed by adding an additional check to IndirsAreEquivalent (implementation of the mikedn's approach: https://github.com/dotnet/coreclr/pull/1329#discussion_r36397171). Fix #1323.
2015-08-11Implement TimeZoneInfo.GetSystemTimeZones() on LinuxEric Erhardt1-4/+92
Implementing GetSystemTimeZones on Linux by reading the zone.tab file on the machine, parsing out the valid TimeZone IDs from it, and using those Ids to read all the time zones on the machine.
2015-08-11Merge pull request #1375 from jkotas/vs2015-fixesJan Kotas1-1/+1
Assorted fixes for VS2015 build breaks
2015-08-11Fix Windows SDK path for VS2015Jan Kotas1-1/+1
2015-08-10Merge pull request #1352 from eerhardt/masterEric Erhardt2-398/+798
TimeZoneInfo parse v2 tzfile and create AdjustmentRules
2015-08-10TimeZoneInfo parse v2 tzfile and create AdjustmentRulesEric Erhardt2-398/+798
TimeZoneInfo on Linux needs to parse V2 tzfile information and correctly create AdjustmentRule instances based on the tzfile information. To create AdjustmentRules correctly, I introduced a new flag on AdjustmentRule - NoDaylightTransitions, which means the adjustment is fixed for the whole time the rule is in effect. This allows us to create an AdjustmentRule for each time the offset changed in a time zone (whether the change was for Daylight Savings or for some other reason). I also needed to relax the rule that DateStart and DateEnd needed to be DateTimeKind.Unspecified. Instead, when we create NoDaylightTransitions adjustment rules in Linux, we use DateStart and DateEnd to be UTC times the offset transitioned. Fix #2465.
2015-08-10Implement /disassemble nidump option for readytorun imagesJan Kotas2-48/+203
[tfs-changeset: 1512604]
2015-08-10Fix build break on desktopJan Kotas1-2/+1
[tfs-changeset: 1512590]