@@ -386,8 +386,8 @@ struct MappingGo48 {
386
386
static const uptr kTraceMemEnd = 0x620000000000ull ;
387
387
static const uptr kShadowBeg = 0x200000000000ull ;
388
388
static const uptr kShadowEnd = 0x238000000000ull ;
389
- static const uptr kAppMemBeg = 0x000000001000ull ;
390
- static const uptr kAppMemEnd = 0x00e000000000ull ;
389
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
390
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
391
391
};
392
392
393
393
/* Go on windows
@@ -409,8 +409,8 @@ struct MappingGoWindows {
409
409
static const uptr kTraceMemEnd = 0x076000000000ull ;
410
410
static const uptr kShadowBeg = 0x010000000000ull ;
411
411
static const uptr kShadowEnd = 0x050000000000ull ;
412
- static const uptr kAppMemBeg = 0x000000001000ull ;
413
- static const uptr kAppMemEnd = 0x00e000000000ull ;
412
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
413
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
414
414
};
415
415
416
416
/* Go on linux/powerpc64 (46-bit VMA)
@@ -433,8 +433,8 @@ struct MappingGoPPC64_46 {
433
433
static const uptr kTraceMemEnd = 0x380000000000ull ;
434
434
static const uptr kShadowBeg = 0x200000000000ull ;
435
435
static const uptr kShadowEnd = 0x238000000000ull ;
436
- static const uptr kAppMemBeg = 0x000000001000ull ;
437
- static const uptr kAppMemEnd = 0x00e000000000ull ;
436
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
437
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
438
438
};
439
439
440
440
/* Go on linux/powerpc64 (47-bit VMA)
@@ -457,8 +457,8 @@ struct MappingGoPPC64_47 {
457
457
static const uptr kTraceMemEnd = 0x620000000000ull ;
458
458
static const uptr kShadowBeg = 0x200000000000ull ;
459
459
static const uptr kShadowEnd = 0x300000000000ull ;
460
- static const uptr kAppMemBeg = 0x000000001000ull ;
461
- static const uptr kAppMemEnd = 0x00e000000000ull ;
460
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
461
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
462
462
};
463
463
464
464
/* Go on linux/aarch64 (48-bit VMA) and darwin/aarch64 (47-bit VMA)
@@ -480,8 +480,8 @@ struct MappingGoAarch64 {
480
480
static const uptr kTraceMemEnd = 0x620000000000ull ;
481
481
static const uptr kShadowBeg = 0x200000000000ull ;
482
482
static const uptr kShadowEnd = 0x300000000000ull ;
483
- static const uptr kAppMemBeg = 0x000000001000ull ;
484
- static const uptr kAppMemEnd = 0x00e000000000ull ;
483
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
484
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
485
485
};
486
486
487
487
/*
@@ -504,8 +504,8 @@ struct MappingGoMips64_47 {
504
504
static const uptr kTraceMemEnd = 0x620000000000ull ;
505
505
static const uptr kShadowBeg = 0x200000000000ull ;
506
506
static const uptr kShadowEnd = 0x300000000000ull ;
507
- static const uptr kAppMemBeg = 0x000000001000ull ;
508
- static const uptr kAppMemEnd = 0x00e000000000ull ;
507
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
508
+ static const uptr kLoAppMemEnd = 0x00e000000000ull ;
509
509
};
510
510
511
511
/*
@@ -525,8 +525,8 @@ struct MappingGoS390x {
525
525
static const uptr kTraceMemEnd = 0xb00000000000ull ;
526
526
static const uptr kShadowBeg = 0x400000000000ull ;
527
527
static const uptr kShadowEnd = 0x800000000000ull ;
528
- static const uptr kAppMemBeg = 0x000000001000ull ;
529
- static const uptr kAppMemEnd = 0x100000000000ull ;
528
+ static const uptr kLoAppMemBeg = 0x000000001000ull ;
529
+ static const uptr kLoAppMemEnd = 0x100000000000ull ;
530
530
};
531
531
532
532
#if defined(__x86_64__)
@@ -654,8 +654,6 @@ enum MappingType {
654
654
MAPPING_MID_APP_END,
655
655
MAPPING_HEAP_BEG,
656
656
MAPPING_HEAP_END,
657
- MAPPING_APP_BEG,
658
- MAPPING_APP_END,
659
657
MAPPING_SHADOW_BEG,
660
658
MAPPING_SHADOW_END,
661
659
MAPPING_META_SHADOW_BEG,
@@ -669,19 +667,16 @@ struct MappingField {
669
667
template <typename Mapping>
670
668
static uptr Apply (MappingType type) {
671
669
switch (type) {
672
- #if !SANITIZER_GO
673
670
case MAPPING_LO_APP_BEG: return Mapping::kLoAppMemBeg ;
674
671
case MAPPING_LO_APP_END: return Mapping::kLoAppMemEnd ;
672
+ #if !SANITIZER_GO
675
673
case MAPPING_MID_APP_BEG: return Mapping::kMidAppMemBeg ;
676
674
case MAPPING_MID_APP_END: return Mapping::kMidAppMemEnd ;
677
675
case MAPPING_HI_APP_BEG: return Mapping::kHiAppMemBeg ;
678
676
case MAPPING_HI_APP_END: return Mapping::kHiAppMemEnd ;
679
677
case MAPPING_HEAP_BEG: return Mapping::kHeapMemBeg ;
680
678
case MAPPING_HEAP_END: return Mapping::kHeapMemEnd ;
681
679
case MAPPING_VDSO_BEG: return Mapping::kVdsoBeg ;
682
- #else
683
- case MAPPING_APP_BEG: return Mapping::kAppMemBeg ;
684
- case MAPPING_APP_END: return Mapping::kAppMemEnd ;
685
680
#endif
686
681
case MAPPING_SHADOW_BEG: return Mapping::kShadowBeg ;
687
682
case MAPPING_SHADOW_END: return Mapping::kShadowEnd ;
@@ -696,7 +691,6 @@ struct MappingField {
696
691
}
697
692
};
698
693
699
- #if !SANITIZER_GO
700
694
ALWAYS_INLINE
701
695
uptr LoAppMemBeg (void ) {
702
696
return SelectMapping<MappingField>(MAPPING_LO_APP_BEG);
@@ -706,6 +700,7 @@ uptr LoAppMemEnd(void) {
706
700
return SelectMapping<MappingField>(MAPPING_LO_APP_END);
707
701
}
708
702
703
+ #if !SANITIZER_GO
709
704
ALWAYS_INLINE
710
705
uptr MidAppMemBeg (void ) {
711
706
return SelectMapping<MappingField>(MAPPING_MID_APP_BEG);
@@ -732,23 +727,16 @@ uptr HiAppMemEnd(void) {
732
727
ALWAYS_INLINE
733
728
uptr VdsoBeg (void ) { return SelectMapping<MappingField>(MAPPING_VDSO_BEG); }
734
729
735
- #else
736
-
737
- ALWAYS_INLINE
738
- uptr AppMemBeg (void ) { return SelectMapping<MappingField>(MAPPING_APP_BEG); }
739
- ALWAYS_INLINE
740
- uptr AppMemEnd (void ) { return SelectMapping<MappingField>(MAPPING_APP_END); }
741
-
742
730
#endif
743
731
744
732
static inline
745
733
bool GetUserRegion (int i, uptr *start, uptr *end) {
746
734
switch (i) {
747
- #if !SANITIZER_GO
748
735
case 0 :
749
736
*start = LoAppMemBeg ();
750
737
*end = LoAppMemEnd ();
751
738
return true ;
739
+ #if !SANITIZER_GO
752
740
case 1 :
753
741
*start = HiAppMemBeg ();
754
742
*end = HiAppMemEnd ();
@@ -764,11 +752,6 @@ bool GetUserRegion(int i, uptr *start, uptr *end) {
764
752
return true ;
765
753
}
766
754
FALLTHROUGH;
767
- #else
768
- case 0 :
769
- *start = AppMemBeg ();
770
- *end = AppMemEnd ();
771
- return true ;
772
755
#endif
773
756
default :
774
757
return false ;
@@ -807,7 +790,7 @@ struct IsAppMemImpl {
807
790
(mem >= Mapping::kLoAppMemBeg && mem < Mapping::kLoAppMemEnd ) ||
808
791
(mem >= Mapping::kHiAppMemBeg && mem < Mapping::kHiAppMemEnd );
809
792
#else
810
- return mem >= Mapping::kAppMemBeg && mem < Mapping::kAppMemEnd ;
793
+ return mem >= Mapping::kLoAppMemBeg && mem < Mapping::kLoAppMemEnd ;
811
794
#endif
812
795
}
813
796
};
0 commit comments