Bug 1508745 - Support some additional redirections after diverging from the recording, r=lsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 20 Nov 2018 08:41:59 -1000
changeset 504170 a847298c2a31439262b757adf26d45e05275a53e
parent 504169 dc1eb225488c72c73dabcce4179b94e3dd008ca9
child 504171 3578632557aafbb6ff8564189e0b5a684418d4d6
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsmyth
bugs1508745
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508745 - Support some additional redirections after diverging from the recording, r=lsmyth.
toolkit/recordreplay/ProcessRedirectDarwin.cpp
--- a/toolkit/recordreplay/ProcessRedirectDarwin.cpp
+++ b/toolkit/recordreplay/ProcessRedirectDarwin.cpp
@@ -71,17 +71,17 @@ namespace recordreplay {
   MACRO(socket, RR_SaveRvalHadErrorNegative)                     \
   MACRO(kqueue, RR_SaveRvalHadErrorNegative)                     \
   MACRO(pipe, RR_SaveRvalHadErrorNegative<RR_WriteBufferFixedSize<0, 2 * sizeof(int)>>, \
         nullptr, nullptr, Preamble_SetError)                     \
   MACRO(close, RR_SaveRvalHadErrorNegative, nullptr, nullptr, Preamble_Veto<0>) \
   MACRO(__close_nocancel, RR_SaveRvalHadErrorNegative)           \
   MACRO(mkdir, RR_SaveRvalHadErrorNegative)                      \
   MACRO(dup, RR_SaveRvalHadErrorNegative)                        \
-  MACRO(access, RR_SaveRvalHadErrorNegative)                     \
+  MACRO(access, RR_SaveRvalHadErrorNegative, nullptr, nullptr, Preamble_SetError<EACCES>) \
   MACRO(lseek, RR_SaveRvalHadErrorNegative)                      \
   MACRO(socketpair, RR_SaveRvalHadErrorNegative<RR_WriteBufferFixedSize<3, 2 * sizeof(int)>>) \
   MACRO(fileport_makeport,                                       \
         RR_SaveRvalHadErrorNegative<RR_WriteBufferFixedSize<1, sizeof(size_t)>>) \
   MACRO(getsockopt, RR_SaveRvalHadErrorNegative<RR_getsockopt>)  \
   MACRO(gettimeofday, RR_SaveRvalHadErrorNegative<RR_Compose<    \
                         RR_WriteOptionalBufferFixedSize<0, sizeof(struct timeval)>, \
                         RR_WriteOptionalBufferFixedSize<1, sizeof(struct timezone)>>>, \
@@ -173,28 +173,30 @@ namespace recordreplay {
   MACRO(dlsym, nullptr, Preamble_PassThrough)                    \
   MACRO(fclose, RR_SaveRvalHadErrorNegative)                     \
   MACRO(fopen, RR_SaveRvalHadErrorZero)                          \
   MACRO(fread, RR_Compose<RR_ScalarRval, RR_fread>)              \
   MACRO(fseek, RR_SaveRvalHadErrorNegative)                      \
   MACRO(ftell, RR_SaveRvalHadErrorNegative)                      \
   MACRO(fwrite, RR_ScalarRval)                                   \
   MACRO(getenv, RR_CStringRval, Preamble_getenv, nullptr, Preamble_Veto<0>) \
-  MACRO(localtime_r, RR_SaveRvalHadErrorZero<RR_Compose<         \
-                       RR_WriteBufferFixedSize<1, sizeof(struct tm)>, \
-                       RR_RvalIsArgument<1>>>)                   \
-  MACRO(gmtime_r, RR_SaveRvalHadErrorZero<RR_Compose<            \
-                    RR_WriteBufferFixedSize<1, sizeof(struct tm)>, \
-                    RR_RvalIsArgument<1>>>)                      \
-  MACRO(localtime, nullptr, Preamble_localtime)                  \
-  MACRO(gmtime, nullptr, Preamble_gmtime)                        \
+  MACRO(localtime_r,                                             \
+        RR_SaveRvalHadErrorZero<RR_Compose<RR_WriteBufferFixedSize<1, sizeof(struct tm)>, \
+                                RR_RvalIsArgument<1>>>,          \
+        nullptr, nullptr, Preamble_PassThrough)                  \
+  MACRO(gmtime_r,                                                \
+        RR_SaveRvalHadErrorZero<RR_Compose<RR_WriteBufferFixedSize<1, sizeof(struct tm)>, \
+                                RR_RvalIsArgument<1>>>,          \
+        nullptr, nullptr, Preamble_PassThrough)                  \
+  MACRO(localtime, nullptr, Preamble_localtime, nullptr, Preamble_PassThrough) \
+  MACRO(gmtime, nullptr, Preamble_gmtime, nullptr, Preamble_PassThrough) \
   MACRO(mktime, RR_Compose<RR_ScalarRval, RR_WriteBufferFixedSize<0, sizeof(struct tm)>>) \
   MACRO(setlocale, RR_CStringRval)                               \
   MACRO(strftime, RR_Compose<RR_ScalarRval, RR_WriteBufferViaRval<0, 1, 1>>) \
-  MACRO(arc4random, RR_ScalarRval)                               \
+  MACRO(arc4random, RR_ScalarRval, nullptr, nullptr, Preamble_PassThrough) \
   MACRO(mach_absolute_time, RR_ScalarRval, Preamble_mach_absolute_time, \
         nullptr, Preamble_PassThrough)                           \
   MACRO(mach_msg, RR_Compose<RR_ScalarRval, RR_WriteBuffer<0, 3>>, \
         nullptr, nullptr, Preamble_WaitForever)                  \
   MACRO(mach_timebase_info,                                      \
         RR_Compose<RR_ScalarRval, RR_WriteBufferFixedSize<0, sizeof(mach_timebase_info_data_t)>>) \
   MACRO(mach_vm_allocate, nullptr, Preamble_mach_vm_allocate)    \
   MACRO(mach_vm_deallocate, nullptr, Preamble_mach_vm_deallocate) \
@@ -352,17 +354,17 @@ namespace recordreplay {
   MACRO(CGBitmapContextGetBytesPerRow, RR_ScalarRval)            \
   MACRO(CGBitmapContextGetHeight, RR_ScalarRval)                 \
   MACRO(CGBitmapContextGetWidth, RR_ScalarRval)                  \
   MACRO(CGColorRelease, RR_ScalarRval)                           \
   MACRO(CGColorSpaceCopyICCProfile, RR_ScalarRval)               \
   MACRO(CGColorSpaceCreateDeviceGray, RR_ScalarRval, nullptr, Middleman_CreateCFTypeRval) \
   MACRO(CGColorSpaceCreateDeviceRGB, RR_ScalarRval, nullptr, Middleman_CreateCFTypeRval) \
   MACRO(CGColorSpaceCreatePattern, RR_ScalarRval)                \
-  MACRO(CGColorSpaceRelease, RR_ScalarRval)                      \
+  MACRO(CGColorSpaceRelease, RR_ScalarRval, nullptr, nullptr, Preamble_Veto<0>) \
   MACRO(CGContextBeginTransparencyLayerWithRect)                 \
   MACRO(CGContextClipToRects, RR_ScalarRval, nullptr,            \
         Middleman_Compose<Middleman_CFTypeArg<0>, Middleman_Buffer<1, 2, CGRect>>) \
   MACRO(CGContextConcatCTM, nullptr, nullptr,                    \
         Middleman_Compose<Middleman_CFTypeArg<0>,                \
                           Middleman_StackArgumentData<sizeof(CGAffineTransform)>>) \
   MACRO(CGContextDrawImage, RR_FlushCGContext<0>)                \
   MACRO(CGContextEndTransparencyLayer)                           \
@@ -407,17 +409,20 @@ namespace recordreplay {
   MACRO(CGDisplayIOServicePort, RR_ScalarRval)                   \
   MACRO(CGEventSourceCounterForEventType, RR_ScalarRval)         \
   MACRO(CGFontCopyTableForTag, RR_ScalarRval, nullptr,           \
         Middleman_Compose<Middleman_CFTypeArg<0>, Middleman_CreateCFTypeRval>) \
   MACRO(CGFontCopyTableTags, RR_ScalarRval, nullptr,             \
         Middleman_Compose<Middleman_CFTypeArg<0>, Middleman_CreateCFTypeRval>) \
   MACRO(CGFontCopyVariations, RR_ScalarRval, nullptr,            \
         Middleman_Compose<Middleman_CFTypeArg<0>, Middleman_CreateCFTypeRval>) \
-  MACRO(CGFontCreateCopyWithVariations, RR_ScalarRval)           \
+  MACRO(CGFontCreateCopyWithVariations, RR_ScalarRval, nullptr,  \
+        Middleman_Compose<Middleman_CFTypeArg<0>,                \
+                          Middleman_CFTypeArg<1>,                \
+                          Middleman_CreateCFTypeRval>)           \
   MACRO(CGFontCreateWithDataProvider, RR_ScalarRval, nullptr,    \
         Middleman_Compose<Middleman_CFTypeArg<0>, Middleman_CreateCFTypeRval>) \
   MACRO(CGFontCreateWithFontName, RR_ScalarRval, nullptr,        \
         Middleman_Compose<Middleman_CFTypeArg<0>, Middleman_CreateCFTypeRval>) \
   MACRO(CGFontCreateWithPlatformFont, RR_ScalarRval)             \
   MACRO(CGFontGetAscent, RR_ScalarRval, nullptr, Middleman_CFTypeArg<0>) \
   MACRO(CGFontGetCapHeight, RR_ScalarRval, nullptr, Middleman_CFTypeArg<0>) \
   MACRO(CGFontGetDescent, RR_ScalarRval, nullptr, Middleman_CFTypeArg<0>) \