Граф коммитов

7638 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot c46d9857a4
[runtime] Filter isblank input to 8 bits values (#7420)
Help static analyzer by clarifying that only `char` will be given to
`isblank` so it does not look like it could be used to index an array
and gets out of bounds (important since this is user supplied values).

Digging down into `isblank` will get you to
> Using tainted variable _c as an index to array _DefaultRuneLocale.__runetype.
2019-11-13 20:46:20 +01:00
Manuel de la Pena f613021a3f
[CoreFoundation] Add Clone method for CFArray. (#7403)
When working on https://github.com/xamarin/maccore/issues/940 we noticed
that clone the array would be a better approach.

The CFArrayCreateCopy add some nice things:

* The pointer values from theArray are copied into the new array.
* The values are also retained by the new array.
* The count of the new array is the same as theArray
* The new array uses the same callbacks as theArray. [IMPORTANT]

Whith this in, we can have a better fix for https://github.com/xamarin/maccore/issues/940
2019-11-13 06:06:23 -05:00
Manuel de la Pena 8a63932245
[Tests] GetGlobalQueue_QualityOfService is only supported on Mac OS X 10.10 and later (#7419)
Ensure that the test does not fail in earlier versions of the os.

Fixes: https://github.com/xamarin/maccore/issues/2062
2019-11-13 06:03:23 -05:00
monojenkins b69e72ba5c [d16-4] [Tests] If we have server errors. Mark test as inconclusive. (#7417)
If we are getting errors (500,401..) do not mark a link all test as a
failure, but as inconclusive.

Fixes: https://github.com/xamarin/maccore/issues/2056
2019-11-12 15:45:06 -05:00
Manuel de la Pena 63ab48e679
[Runtime] Enable the -Wsign-conversion warnings flag and fix some of the warnings. (#7405)
The flag adds a lot (A LOT) of warnings. The diff would be huge and
dangerous to review. We enable the flag and fix file by file.
2019-11-12 15:10:16 -05:00
monojenkins 83fd5162f2 [xcode11.3] [Tests] If we have server errors. Mark test as inconclusive. (#7415)
If we are getting errors (500,401..) do not mark a link all test as a
failure, but as inconclusive.

Fixes: https://github.com/xamarin/maccore/issues/2056
2019-11-12 15:08:18 -05:00
Sebastien Pouliot f0f06c1338
[runtime] Zeroize dummy member of structure in binding-generator (#7411)
This is not exposed so it should never be an issue - but just in
case something else goes wrong then it will only be 0 (and not
random values).
2019-11-12 21:03:56 +01:00
Manuel de la Pena ca98880277
[Tests] If we have server errors. Mark test as inconclusive. (#7401)
If we are getting errors (500,401..) do not mark a link all test as a
failure, but as inconclusive. Update the urls since msdn is giving always a 500.

Fixes: https://github.com/xamarin/maccore/issues/2056
2019-11-12 13:34:58 -05:00
Rolf Bjarne Kvinge 268f9e8c23
Bump maccore to get mlaunch fix. (#7412)
Diff: f56575dcc2..92433b7757
2019-11-12 18:51:27 +01:00
monojenkins 31be34a306 [xcode11.3] [Packaging] Ensure that when we build from source, the srcs go to the correct place. (#7407)
* [Packaging] Ensure that when we build from source, the srcs go to the correct plance.

When building from source, the install-sources command was not moving
the files correctly. This change makes sure that, if we build from
source, we do add the mono sources in the correct location.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7393
2019-11-12 09:05:35 -05:00
michizhou e9b18d4c2f [CoreFoundation] [tests] Add new DispatchQueue overloaded method (#7343)
* [CoreFoundation] [tests] Add new DispatchQueue overloaded method with unit tests. Fixes #6783

* [CoreFoundation] [tests] Add new variant method to DispatchQueue

* [CoreFoundation] [tests] Remove nonexistent DispatchQueue methods

* [CoreFoundation] [tests] Restore existing methods and tests
2019-11-12 14:56:45 +01:00
Sebastien Pouliot 0b323ca4cd
[runtime] Clarify redirect_io behaviour (#7409)
Change `redirect_io` to be easier to re-use correctly, i.e. returning the
file descriptor (instead of `0`).

Comment why the file descriptor are never released. It makes sense but
it's not obvious (even less in `redirect_io`) without comments.

Using static fields also makes it easier for static analysis (locals are
easier to process).

Finally reuse, mostly, the same string for the error message, i.e.

```
$ strings runtime//.libs/mac/libxammac.x86_64.dylib | grep "Could not redirect"
Xamarin.Mac: Could not redirect %s to `%s': %s
```
versus
```
$ strings runtime//.libs/mac/libxammac.x86_64.dylib | grep "Could not redirect"
Xamarin.Mac: Could not redirect stdout to `%s': %s
Xamarin.Mac: Could not redirect stderr to `%s': %s
```
2019-11-12 12:34:49 +01:00
Manuel de la Pena e639470892
[Packaging] Ensure that when we build from source, the srcs go to the correct place. (#7394)
* [Packaging] Ensure that when we build from source,  the srcs go to the correct plance.

When building from source, the install-sources command was not moving
the files correctly. This change makes sure that, if we build from
source, we do add the mono sources in the correct location.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7393
2019-11-11 18:18:28 -05:00
Manuel de la Pena 452f4dcf7d
[CoreFoundation] Ensure that we are thread safe. (#7391)
CFBundleGetAllBundles as per Apple docs is not thread safe, this means
that when we loop over the bundles, and use a property, the value is
updated by a different thread. This means that in some weird cases we
get an IndexOutOfBounds exception. We now store the count and use it in
the loop.

Fixes: https://github.com/xamarin/maccore/issues/940
2019-11-08 18:07:59 -05:00
monojenkins 6d13a39027 [Install] Ensure that sources from mono are included when building from source. (#7389)
The PathManglerFactory was getting confused when building mono from
source again and since it did not find the sources in the download
directory it considered that the path to modify was part of Xamarin.

Now the factory tests first if we are getting a path from the mono
external submodule, if that is the case we know is a mono path and do
the right thing.

Fixes https://github.com/xamarin/maccore/issues/2053
2019-11-08 16:08:30 -05:00
monojenkins 9297672d22 [Install] Ensure that sources from mono are included when building from source. (#7390)
The PathManglerFactory was getting confused when building mono from
source again and since it did not find the sources in the download
directory it considered that the path to modify was part of Xamarin.

Now the factory tests first if we are getting a path from the mono
external submodule, if that is the case we know is a mono path and do
the right thing.

Fixes https://github.com/xamarin/maccore/issues/2053
2019-11-08 16:07:47 -05:00
Manuel de la Pena cf6280b305
[Install] Ensure that sources from mono are included when building from source. (#7385)
The PathManglerFactory was getting confused when building mono from
source again and since it did not find the sources in the download
directory it considered that the path to modify was part of Xamarin.

Now the factory tests first if we are getting a path from the mono
external submodule, if that is the case we know is a mono path and do
the right thing.

Fixes https://github.com/xamarin/maccore/issues/2053
2019-11-08 10:33:20 -05:00
Rolf Bjarne Kvinge e23362854e
[tests] Add make target to manually launch a device test run for the current commit. (#7282)
* [tests] Add make target to manually launch a device test run for the current commit.

* Upload a manifest that can be found using only the hash, and use it to find the packages.
2019-11-07 22:41:24 +01:00
Waleed Chaudhry a1b670cd63
[FileProvider] Add FileProvider binding xcode11.2b1 (#7384) 2019-11-07 14:42:47 -05:00
monojenkins 5fa3d8abbb [Install] Do not crash when the directory is not found. (#7382)
This is NOT a fix for https://github.com/xamarin/maccore/issues/2053 but
a nice thing to have to make sure that when the file cannot be copied we
have a useful debugging message. Fixing
https://github.com/xamarin/maccore/issues/2053 should be done in the
path mangler that is doing something wrong with the paths.
2019-11-07 13:25:41 -05:00
monojenkins 2db10bda07 [Install] Do not crash when the directory is not found. (#7380)
This is NOT a fix for https://github.com/xamarin/maccore/issues/2053 but
a nice thing to have to make sure that when the file cannot be copied we
have a useful debugging message. Fixing
https://github.com/xamarin/maccore/issues/2053 should be done in the
path mangler that is doing something wrong with the paths.
2019-11-07 13:25:25 -05:00
monojenkins 0641e079e0 Update APIDIFF_REFERENCES to current stable (#7375) 2019-11-06 17:09:49 -05:00
monojenkins 2d28504961 Update APIDIFF_REFERENCES to current stable (#7373) 2019-11-06 17:08:06 -05:00
Vincent Dondain 011aaf7ccb
Update APIDIFF_REFERENCES to current stable (#7372) 2019-11-06 17:06:38 -05:00
Manuel de la Pena 566e5a8d12
[Install] Do not crash when the directory is not found. (#7378)
This is NOT a fix for https://github.com/xamarin/maccore/issues/2053 but
a nice thing to have to make sure that when the file cannot be copied we
have a useful debugging message. Fixing
https://github.com/xamarin/maccore/issues/2053 should be done in the
path mangler that is doing something wrong with the paths.
2019-11-06 16:09:02 -05:00
Pramit Mallick 0c1b9b9b03 [UIKit] Added Static to UITraitCollection.FromPreferredContentSizeCategory (#7350)
Add a new static method to be used and obsolete the old wrong bound code.
2019-11-06 15:22:52 -05:00
monojenkins 8536ba6975 [Tests] Fix introspection failing due to a typo. (#7377)
Fixes: https://github.com/xamarin/maccore/issues/2052
2019-11-06 15:21:24 -05:00
monojenkins 1926eaecee [Tests] Fix introspection failing due to a typo. (#7376)
Fixes: https://github.com/xamarin/maccore/issues/2052
2019-11-06 14:52:13 -05:00
monojenkins 374fe91721 [Tests] Fix introspection failing due to a typo. (#7370)
Fixes: https://github.com/xamarin/maccore/issues/2052
2019-11-06 10:45:04 -05:00
Vincent Dondain 63d092d526
Merge pull request #7368 from VincentDondain/master-merge-xcode11.2
Merge xcode11.2 into master
2019-11-06 10:43:45 -05:00
Rolf Bjarne Kvinge 2b570fafba
Bump mono to get mono archives. (#7365)
New commits in mono/mono:

* mono/mono@062f0ab8ca [sdks] Use Xcode 11.2 stable version for iOS/Mac SDKs

Diff: e1ef774391..062f0ab8ca
2019-11-06 07:40:35 +01:00
monojenkins 954c01b54e Bump mono to get mono archives. (#7367)
New commits in mono/mono:

* mono/mono@062f0ab8ca [sdks] Use Xcode 11.2 stable version for iOS/Mac SDKs

Diff: e1ef774391..062f0ab8ca
2019-11-06 07:26:18 +01:00
Manuel de la Pena 746fd47638
[Networking] Add the NWFramer implementation. (#7338)
Uncommented the sources and update some mistakes after following the
sample provided by Apple. Initially tests were going to be added but
they resulted to be to flacky and would make the CI red too often to be
adding value.

Porting the sample will ensure that it works are the bindings are not
broken.
2019-11-05 15:32:17 -05:00
Vincent Dondain a558d84457 Merge branch 'xcode11.2' into master-merge-xcode11.2 2019-11-05 15:25:49 -05:00
Vincent Dondain ef1ccbd3f0
Update xcode11.3 version to 13.9/6.9 (#7362)
(.9) was previously used by master builds but this was not released to the public so we should be fine.
xcode11.3 will eventually become (.10)
2019-11-05 11:07:50 -05:00
Manuel de la Pena 2e5b64893f
[Runtime] Enable the -Wshorten-64-to-32 flag and fix all warnings. (#7353)
* [Runtime] Enable the -Wshorten-64-to-32 flag and fix all warnings.

We want to enable the -Wconversion but that will raise too many warning
for a single commit. We are enabiling one by one the flags included in
-Wconversion so that we have smaller diffs.

-Wshorten-64-to-32 adds warnings when there is a implicit conversion that
loses integer precision. We are moving all the 32 to 64 conversions to
use 64. Expecially since most of the code changed is related with sizes,
legths and params counts that are never going to be negative.


Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-11-05 11:00:14 -05:00
Vincent Dondain 44c08f2ca3
Merge pull request #7355 from VincentDondain/d16-4-xcode11.2-merge
Merge xcode11.2 into d16-4
2019-11-04 16:25:02 -05:00
Marius Ungureanu f079db990b Remove redundant class_ptr initialization (#7357)
This is already done by the generated code, as seen below.

```csharp
		selWindowWithWindowNumber_Handle = Selector.GetHandle ("windowWithWindowNumber:");
		selWindowsHandle = Selector.GetHandle ("windows");
		selWindowsMenuHandle = Selector.GetHandle ("windowsMenu");
		class_ptr = Class.GetHandle ("NSApplication");
		class_ptr = Class.GetHandle ("NSApplication");
	}
```

With this change, we've also removed the static constructor, therefore all the fields are going to be initialized when they are used, as opposed to being forcefully loaded on the first access. This may improve startup times
2019-11-04 21:46:30 +01:00
michizhou 00f7069b23 [mmp] [mtouch] Expand error message for MM4162 and MT4162. Fixes #4286 (#7313) 2019-11-04 11:09:28 -05:00
Sebastien Pouliot e55e434213
[runtime] Free `env-argv` in `xamarin-main` (#7352)
`get_mono_env_options` allocate memory so it must [1] be freed.

[1] to be polite since it will be freed when the app exit, which
will free everything anyway
2019-11-04 08:56:59 -05:00
Sebastien Pouliot 8f92c3dcdd
[runtime] Merge two identical code paths (#7351) 2019-11-04 08:55:02 -05:00
Vincent Dondain 898ea3cdbf [d16-4] Bump mono 2019-08@e1ef7743 (#7356)
New commits in mono/mono:

* mono/mono@e1ef774391 [2019-08] Bump CoreFX to pickup corefx PR #367 to fix #17133. (#17622)
* mono/mono@6d1f88e0ad Bump msbuild to get SDK updates from https://github.com/mono/msbuild/pull/150
* mono/mono@a3f3bfc4c3 Bump nuget to the latest suggested version
* mono/mono@9bd3079f1c [2019-08] bump msbuild with more p2 packages
* mono/mono@6ac1ff75a2 [dim][regression] Explicit interface override (#17583) (#17627)
* mono/mono@a119807a01 [acceptance-tests] Bump mono/roslyn to get build fix
* mono/mono@d234d34b70 [2019-08][merp] Install sigterm handler in EnableMicrosoftTelemetry
* mono/mono@444a9a3fc4 [2019-08] [merp] Introduce a new 'dump mode' that allows different signal behavior when dumping (#17568)

Diff: 8946e49a97..e1ef774391
2019-11-04 08:38:19 +01:00
Vincent Dondain ec3c01d131 Merge branch 'xcode11.2' into d16-4-xcode11.2-merge 2019-11-01 17:11:44 -04:00
joe f1cb310043 Updated reference to xamarin/Xamarin.MacDev@ca221c8 2019-11-01 07:54:36 -04:00
Vincent Dondain e3c2b406de Bump to Xcode 11.2 final (#7347)
* Bump to Xcode 11.2 final

* Fix xtro
2019-10-31 23:25:04 -04:00
Whitney Schmidt d90223a316
[MapKit] Xcode 11.2 update (#7331)
* mapkit 11.2

* make methods public

* add async attribute

* style fixes, using pattern
2019-10-31 11:11:41 -04:00
Pramit Mallick c4f28a1888
[MPSCore] Xcode11.1 GM Binding (#7330) 2019-10-31 10:02:53 -04:00
Sebastien Pouliot e736477377
[runtime] Remove some classic (pre-unified) code that is not used anymore. (#7341) 2019-10-30 20:54:30 -04:00
Sebastien Pouliot d3e188493a
Bump XI/XM versions over (branched) d16-5 (#7342) 2019-10-30 19:42:25 -04:00
Manuel de la Pena 8b45260ee4
[Runtime] Ensure that all comparisons between signed and unsigned values are fixed. (#7339)
Enable the -Wsign-compare which will raise issues when a comparison
between signed and unsigned values could produce an incorrect result
and fix all the raised warnings.
2019-10-30 15:58:13 -04:00