Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ GSL 3.0.0 Release

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š GSL 3.0.0 Release


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: devblogs.microsoft.com

GSL 3.0.0 Release

Version 3.0.0 of Microsoftโ€™s implementation of the C++ Core Guidelines Support Library (GSL) is now available for you to download on the releases page. Microsoftโ€™s implementation of gsl::span has played a pivotal role in the standardization of span for C++20. However, the standard does not provide any runtime checking guarantees for memory bounds safety. The bounds safety provided by gsl::span has been very successful in preventing security issues in Microsoft products. This release maintains the safety guarantees that we have always offered but modernizes our implementation to align with C++20 span.

What changed in this release?

  • New implementations of gsl::span and gsl::span_iterator that align to the C++ 20 standard.
  • Changes to contract violation behavior.
  • Additional CMake support.
  • Deprecation of gsl::multi_span and gsl::strided_span.

When should I use gsl::span instead of std::span?

By default, useย std::spanย whichย is shipping in VS2019 16.6ย (with additional interface changes in 16.7,ย see release notes)ย if you have enabled C++20 mode and do not need runtime bounds checking guarantees.ย Useย gsl::spanย if you need support for a version of C++ lower than C++20 (gsl::spanย supports C++14 andย higher) orย runtime bounds checking guarantees (all operations performed onย gsl::spanย and its iterators have explicit bounds safety checks.)ย ย 

gsl::span

With the standardization of span nearing completion, we decided it was time to align our implementation with the design changes in the standard. The new implementation provides full bounds checking, guaranteeing bounds safety if the underlying data is valid.

General changes

gsl::span was rewritten to have its interface align to std::span. The biggest change is that spanโ€™s Extent is now unsigned. It is now implemented as std::size_t whereas previously it was std::ptrdiff_t. By extension, dynamic_extent is now defined as static_cast<std::size_t>(-1) instead of just -1.

  • The field span::index_type was removed, superseded by span::size_type.
  • Addition of Class Template Argument Deduction (CTAD) support.

Interface alignment

These are the changes required to align gsl::span to the interface of std::span.

Removed functions

  • span::operator()
  • span::at
  • span::cbegin
  • span::cend
  • span::crbegin
  • span::crend

Added functions

  • span::front
  • span::back

Renamed functions

  • span::as_writeable_bytes was renamed to span::as_writable_bytes

gsl::span_iterator

General changes

Our implementation of span_iterator has been completely rewritten to be more range-like. Previously, the implementation consisted of a span pointer and an offset. The new implementation is a set of three pointers: begin, end, and current.

Benefits of our new implementation

The new implementation can perform all of the bounds checks by itself, instead of calling into the span. By relying on pointers to the underlying data, rather than a pointer to the span, the new span_iterator can outlive the underlying span.

The new <gsl/span_ext> header

The <gsl/span_ext> header was created to support our customers who rely on portions of the old span implementation that no longer exist in the standard definition of span.

Elements moved from <gsl/span> and inserted into <gsl/span_ext>

  • span comparison operators
  • gsl::make_span
  • span specialization of gsl::at
  • gsl::begin
  • gsl::rbegin
  • gsl::crbegin
  • gsl::end
  • gsl::rend
  • gsl::crend

Contract violations

Contract violations are no longer configurable. Contract violations always result in termination, rather than providing a compile-time option to throw or disregard the contract violation. This is subject to change in the future. Some concerns over this decision have been raised and the conversation continues here: CppCoreGuidelines#1561. As a side note, the removal of the throwing behavior required the migration of our test infrastructure from Catch2 to Google Test, whose support of death tests easily enabled testing of contract violation behavior.

CMake improvements

This release now supports find_package. Once installed, use find_package(Microsoft.GSL CONFIG) to easily consume the GSL.

Deprecation of multi_span and strided_span

To more closely align Microsoftโ€™s GSL to the C++ Core Guidelines, we decided to deprecate our implementation of gsl::multi_span and gsl::strided_span. For the time being, we will continue to provide these headers, but they will not be actively worked on or maintained unless the C++ Core Guidelines identifies a need for them.

Improvementย changesย causingย potentialย buildย breaksย andย mitigationsย 

Change: The change from signed std::ptrdiff_t to unsigned std::size_t in gsl::span may introduce signed/unsigned mismatches.

Mitigation: Use static_cast or gsl::narrow_cast to resolve mismatches.

ย 

Change: gsl::multi_span and gsl::strided_span have been deprecated.

Mitigation: Pass multi-dimensional arrays as constant references instead of gsl::multi_span.

ย 

Change: Code that makes use ofย movedย spanย helperย functionsย will generate compiler errors. Examples of these functions include span comparison operators, gsl::make_span, etc.

Mitigation: Include <gsl/span_ext> instead of <gsl/span> in files where you use these functions.

ย 

Change: Throwing contract violation behavior is removed.

Mitigation: Use a terminate handler to log relevant information before termination executes for debugging. Relying on throwing behavior does not guarantee safety.

Upcoming changes

The paper P1976R2 that came out of the WG21 Prague meeting has yet to be implemented in GSL. A minor release will be issued when this is added to GSL.

Feedback

We look forward to hearing your feedback. If you would like to reach us, please use the comments below or email [email protected]. Visit our page on GitHub if you would like to file issues or contribute to the project.

The post GSL 3.0.0 Release appeared first on C++ Team Blog.

...



๐Ÿ“Œ GSL 3.0.0 Release


๐Ÿ“ˆ 38.42 Punkte

๐Ÿ“Œ C++ Core Guidelines: GSL 3 bringt Anpassungen fรผr C++20


๐Ÿ“ˆ 33.31 Punkte

๐Ÿ“Œ Ausfรผhren beliebiger Kommandos in gsl (Ubuntu)


๐Ÿ“ˆ 33.31 Punkte

๐Ÿ“Œ Plasma 6 Release Candidate 1 has landed. Release Candidate 2 will arrive on January 31st, and the final release will land on February 28


๐Ÿ“ˆ 15.33 Punkte

๐Ÿ“Œ Ubuntu 16.04.5 LTS Release Candidate Ready for Testing Ahead of August 2 Release


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Geary 3.32 released, switches to GNOME release schedule and carries all the great features from the last 0.13 release.


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ May 2019 (Release 2) Release Notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Windows 10 1909 รถffentliches Release Ende Oktober fรผr alle [Update 18363.418 ist die Release Version]


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Microsofts neuer Edge-Browser: Release-Kandidat und Release-Termin


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ FreeBSD up to 10.4-RELEASE-p9/11.1-RELEASE-p11 TCP Segment denial of service


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Chrome (Chromium) release cycle shortened to 4 weeks, Chrome(ium) gets "Extended Stable" release every 8 weeks


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Release Notes for Project Service Automation Update Release 16


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Release Notes for Project Service Automation Update Release 8


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ June 2019 (Release 1) release notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ June 2019 (Release 2) release notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ iOS 14.6 & iPadOS 14.6: Release Candidate ist da (inkl. Release-Notes)


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Media Release: The Haiku Project Celebrates the Release of Beta 3


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ July 2019 (Release 1) release notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Release Notes for Project Service Automation Update Release 9


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Release Notes for Project Service Automation Update Release 17


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ July 2019 (Release 2) release notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Windows 11 22H2 closer to release, lands in the Release channel


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ postmarketOS v22.06 Release: The One Where We Started Using Release Titles


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Mehrere Probleme in release-notes-susemanager und release-notes-susemanager-proxy (SUSE)


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ August 2019 (Release 1) release notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Release Notes for Project Service Automation Update Release 18, V2.4.15.33


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Release Notes for Project Service Automation Update Release 10


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ August 2019 (Release 2) release notes


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Mehrere Probleme in release-notes-susemanager und release-notes-susemanager-proxy (SUSE)


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Denial of Service in caasp-release, cri-o, patchinfo, release-notes-caasp und skuba (SUSE)


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ How long after release of a new major release do you wait to put a Linux server into production?


๐Ÿ“ˆ 10.22 Punkte

๐Ÿ“Œ Lifecycle Services โ€“ September 2019 (Release 1) release notes


๐Ÿ“ˆ 10.22 Punkte











matomo