winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
920 discussions
Start a n
N
ew thread
Rémi Bernon : dmusic: Rewrite instrument lart list parsing.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: b5fd6187198f9b15e2ce3795c6dce798e7f0f3d0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b5fd6187198f9b15e2ce3795c6dce7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 7 10:10:40 2023 +0200 dmusic: Rewrite instrument lart list parsing. --- dlls/dmusic/instrument.c | 63 +++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/dlls/dmusic/instrument.c b/dlls/dmusic/instrument.c index 5941042caa1..1e171048008 100644 --- a/dlls/dmusic/instrument.c +++ b/dlls/dmusic/instrument.c @@ -192,14 +192,16 @@ static inline HRESULT advance_stream(IStream *stream, ULONG bytes) return ret; } -static HRESULT load_articulation(struct instrument *This, IStream *stream, ULONG length) +static HRESULT parse_art1_chunk(struct instrument *This, IStream *stream, struct chunk_entry *chunk) { struct articulation *articulation; CONNECTIONLIST list; HRESULT hr; UINT size; - if (FAILED(hr = read_from_stream(stream, &list, sizeof(list)))) return hr; + if (chunk->size < sizeof(list)) return E_INVALIDARG; + if (FAILED(hr = stream_read(stream, &list, sizeof(list)))) return hr; + if (chunk->size != list.cbSize + sizeof(CONNECTION) * list.cConnections) return E_INVALIDARG; if (list.cbSize != sizeof(list)) return E_INVALIDARG; size = offsetof(struct articulation, connections[list.cConnections]); @@ -207,11 +209,31 @@ static HRESULT load_articulation(struct instrument *This, IStream *stream, ULONG articulation->list = list; size = sizeof(CONNECTION) * list.cConnections; - if (FAILED(hr = read_from_stream(stream, articulation->connections, size))) free(articulation); - else + if (FAILED(hr = stream_read(stream, articulation->connections, size))) free(articulation); + else list_add_tail(&This->articulations, &articulation->entry); + + return hr; +} + +static HRESULT parse_lart_list(struct instrument *This, IStream *stream, struct chunk_entry *parent) +{ + struct chunk_entry chunk = {.parent = parent}; + HRESULT hr; + + while ((hr = stream_next_chunk(stream, &chunk)) == S_OK) { - subtract_bytes(length, sizeof(list) + sizeof(CONNECTION) * list.cConnections); - list_add_tail(&This->articulations, &articulation->entry); + switch (MAKE_IDTYPE(chunk.id, chunk.type)) + { + case FOURCC_ART1: + hr = parse_art1_chunk(This, stream, &chunk); + break; + + default: + FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type)); + break; + } + + if (FAILED(hr)) break; } return hr; @@ -352,30 +374,15 @@ HRESULT instrument_load(IDirectMusicInstrument *iface, IStream *stream) } case FOURCC_LART: + { + static const LARGE_INTEGER zero = {0}; + struct chunk_entry list_chunk = {.id = FOURCC_LIST, .size = chunk.dwSize, .type = chunk.fccID}; TRACE("LART chunk (articulations list): %lu bytes\n", size); - - while (size) - { - hr = read_from_stream(stream, &chunk, sizeof(chunk)); - if (FAILED(hr)) - goto error; - - if (chunk.fccID == FOURCC_ART1) - { - TRACE("ART1 chunk (level 1 articulation): %lu bytes\n", chunk.dwSize); - hr = load_articulation(This, stream, chunk.dwSize); - } - else - { - TRACE("Unknown chunk %s: %lu bytes\n", debugstr_fourcc(chunk.fccID), chunk.dwSize); - hr = advance_stream(stream, chunk.dwSize); - } - if (FAILED(hr)) - goto error; - - size = subtract_bytes(size, chunk.dwSize + sizeof(chunk)); - } + IStream_Seek(stream, zero, STREAM_SEEK_CUR, &list_chunk.offset); + list_chunk.offset.QuadPart -= 12; + hr = parse_lart_list(This, stream, &list_chunk); break; + } default: TRACE("Unknown chunk %s: %lu bytes\n", debugstr_fourcc(chunk.fccID), chunk.dwSize);
1
0
0
0
Rémi Bernon : dmusic: Rewrite instrument lrgn list parsing.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: 9e9b5d2980c28d1a7c126f3ba59257c7cdd2f9d3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9e9b5d2980c28d1a7c126f3ba59257…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 7 09:58:34 2023 +0200 dmusic: Rewrite instrument lrgn list parsing. --- dlls/dmusic/dmobject.c | 2 +- dlls/dmusic/dmobject.h | 2 + dlls/dmusic/instrument.c | 176 ++++++++++++++++++++--------------------------- 3 files changed, 77 insertions(+), 103 deletions(-)
1
0
0
0
Rémi Bernon : dmusic: Reset riff chunk type to 0 when it is invalid.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: 7684880546bf0b7a31aae917b7914ce493b47551 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7684880546bf0b7a31aae917b7914c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Aug 31 10:04:57 2023 +0200 dmusic: Reset riff chunk type to 0 when it is invalid. --- dlls/dmusic/dmobject.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/dmusic/dmobject.c b/dlls/dmusic/dmobject.c index 07d887a376c..a08db8cba58 100644 --- a/dlls/dmusic/dmobject.c +++ b/dlls/dmusic/dmobject.c @@ -338,11 +338,10 @@ HRESULT stream_get_chunk(IStream *stream, struct chunk_entry *chunk) } } - if (chunk->id == FOURCC_LIST || chunk->id == FOURCC_RIFF) { - hr = stream_read(stream, &chunk->type, sizeof(FOURCC)); - if (hr != S_OK) - return hr != S_FALSE ? hr : E_FAIL; - } + if (chunk->id != FOURCC_LIST && chunk->id != FOURCC_RIFF) + chunk->type = 0; + else if ((hr = stream_read(stream, &chunk->type, sizeof(FOURCC))) != S_OK) + return hr != S_FALSE ? hr : E_FAIL; TRACE_(dmfile)("Returning %s\n", debugstr_chunk(chunk));
1
0
0
0
Rémi Bernon : dmusic: Use a struct list for instrument regions.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: 52d3f7ab09f8b4920c71eaa0c385f13f4bf1fa2a URL:
https://gitlab.winehq.org/wine/wine/-/commit/52d3f7ab09f8b4920c71eaa0c385f1…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Aug 31 21:36:18 2023 +0200 dmusic: Use a struct list for instrument regions. --- dlls/dmusic/dmusic_private.h | 8 ++++--- dlls/dmusic/instrument.c | 50 ++++++++++++++++++++++---------------------- dlls/dmusic/port.c | 19 ++++++++++------- 3 files changed, 41 insertions(+), 36 deletions(-) diff --git a/dlls/dmusic/dmusic_private.h b/dlls/dmusic/dmusic_private.h index bdc86b6883c..3fb32d73691 100644 --- a/dlls/dmusic/dmusic_private.h +++ b/dlls/dmusic/dmusic_private.h @@ -71,13 +71,15 @@ typedef struct port_info { ULONG device; } port_info; -typedef struct instrument_region { +struct region +{ + struct list entry; RGNHEADER header; WAVELINK wave_link; WSMPL wave_sample; WLOOP wave_loop; BOOL loop_present; -} instrument_region; +}; /***************************************************************************** * ClassFactory @@ -180,9 +182,9 @@ struct instrument WCHAR wszName[DMUS_MAX_NAME]; /* instrument data */ BOOL loaded; - instrument_region *regions; struct list articulations; + struct list regions; }; static inline struct instrument *impl_from_IDirectMusicInstrument(IDirectMusicInstrument *iface) diff --git a/dlls/dmusic/instrument.c b/dlls/dmusic/instrument.c index a65826976f3..bcd2ef58265 100644 --- a/dlls/dmusic/instrument.c +++ b/dlls/dmusic/instrument.c @@ -84,8 +84,7 @@ static ULONG WINAPI instrument_Release(LPDIRECTMUSICINSTRUMENT iface) if (!ref) { struct articulation *articulation, *next_articulation; - - free(This->regions); + struct region *region, *next_region; LIST_FOR_EACH_ENTRY_SAFE(articulation, next_articulation, &This->articulations, struct articulation, entry) { @@ -93,6 +92,12 @@ static ULONG WINAPI instrument_Release(LPDIRECTMUSICINSTRUMENT iface) free(articulation); } + LIST_FOR_EACH_ENTRY_SAFE(region, next_region, &This->regions, struct region, entry) + { + list_remove(®ion->entry); + free(region); + } + free(This); } @@ -139,6 +144,7 @@ HRESULT instrument_create(IDirectMusicInstrument **ret_iface) instrument->IDirectMusicInstrument_iface.lpVtbl = &instrument_vtbl; instrument->ref = 1; list_init(&instrument->articulations); + list_init(&instrument->regions); TRACE("Created DirectMusicInstrument %p\n", instrument); *ret_iface = &instrument->IDirectMusicInstrument_iface; @@ -186,18 +192,20 @@ static inline HRESULT advance_stream(IStream *stream, ULONG bytes) return ret; } -static HRESULT load_region(struct instrument *This, IStream *stream, instrument_region *region, ULONG length) +static HRESULT load_region(struct instrument *This, IStream *stream, ULONG length) { + struct region *region; HRESULT ret; DMUS_PRIVATE_CHUNK chunk; - TRACE("(%p, %p, %p, %lu)\n", This, stream, region, length); + TRACE("(%p, %p, %lu)\n", This, stream, length); + + if (!(region = malloc(sizeof(*region)))) return E_OUTOFMEMORY; while (length) { ret = read_from_stream(stream, &chunk, sizeof(chunk)); - if (FAILED(ret)) - return ret; + if (FAILED(ret)) goto failed; length = subtract_bytes(length, sizeof(chunk)); @@ -207,8 +215,7 @@ static HRESULT load_region(struct instrument *This, IStream *stream, instrument_ TRACE("RGNH chunk (region header): %lu bytes\n", chunk.dwSize); ret = read_from_stream(stream, ®ion->header, sizeof(region->header)); - if (FAILED(ret)) - return ret; + if (FAILED(ret)) goto failed; length = subtract_bytes(length, sizeof(region->header)); break; @@ -217,16 +224,14 @@ static HRESULT load_region(struct instrument *This, IStream *stream, instrument_ TRACE("WSMP chunk (wave sample): %lu bytes\n", chunk.dwSize); ret = read_from_stream(stream, ®ion->wave_sample, sizeof(region->wave_sample)); - if (FAILED(ret)) - return ret; + if (FAILED(ret)) goto failed; length = subtract_bytes(length, sizeof(region->wave_sample)); if (!(region->loop_present = (chunk.dwSize != sizeof(region->wave_sample)))) break; ret = read_from_stream(stream, ®ion->wave_loop, sizeof(region->wave_loop)); - if (FAILED(ret)) - return ret; + if (FAILED(ret)) goto failed; length = subtract_bytes(length, sizeof(region->wave_loop)); break; @@ -235,8 +240,7 @@ static HRESULT load_region(struct instrument *This, IStream *stream, instrument_ TRACE("WLNK chunk (wave link): %lu bytes\n", chunk.dwSize); ret = read_from_stream(stream, ®ion->wave_link, sizeof(region->wave_link)); - if (FAILED(ret)) - return ret; + if (FAILED(ret)) goto failed; length = subtract_bytes(length, sizeof(region->wave_link)); break; @@ -245,15 +249,19 @@ static HRESULT load_region(struct instrument *This, IStream *stream, instrument_ TRACE("Unknown chunk %s (skipping): %lu bytes\n", debugstr_fourcc(chunk.fccID), chunk.dwSize); ret = advance_stream(stream, chunk.dwSize); - if (FAILED(ret)) - return ret; + if (FAILED(ret)) goto failed; length = subtract_bytes(length, chunk.dwSize); break; } } + list_add_tail(&This->regions, ®ion->entry); return S_OK; + +failed: + free(region); + return ret; } static HRESULT load_articulation(struct instrument *This, IStream *stream, ULONG length) @@ -287,7 +295,6 @@ HRESULT instrument_load(IDirectMusicInstrument *iface, IStream *stream) struct instrument *This = impl_from_IDirectMusicInstrument(iface); HRESULT hr; DMUS_PRIVATE_CHUNK chunk; - ULONG i = 0; ULONG length = This->length; TRACE("(%p, %p): offset = 0x%s, length = %lu)\n", This, stream, wine_dbgstr_longlong(This->liInstrumentPosition.QuadPart), This->length); @@ -302,10 +309,6 @@ HRESULT instrument_load(IDirectMusicInstrument *iface, IStream *stream) return DMUS_E_UNSUPPORTED_STREAM; } - This->regions = malloc(sizeof(*This->regions) * This->header.cRegions); - if (!This->regions) - return E_OUTOFMEMORY; - while (length) { hr = read_from_stream(stream, &chunk, sizeof(chunk)); @@ -362,7 +365,7 @@ HRESULT instrument_load(IDirectMusicInstrument *iface, IStream *stream) if (chunk.fccID == FOURCC_RGN) { TRACE("RGN chunk (region): %lu bytes\n", chunk.dwSize); - hr = load_region(This, stream, &This->regions[i++], chunk.dwSize - sizeof(chunk.fccID)); + hr = load_region(This, stream, chunk.dwSize - sizeof(chunk.fccID)); } else { @@ -431,8 +434,5 @@ HRESULT instrument_load(IDirectMusicInstrument *iface, IStream *stream) return S_OK; error: - free(This->regions); - This->regions = NULL; - return DMUS_E_UNSUPPORTED_STREAM; } diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 95a02704a5f..a5ff9bac16e 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -267,6 +267,7 @@ static HRESULT WINAPI synth_port_DownloadInstrument(IDirectMusicPort *iface, IDi { struct synth_port *This = synth_from_IDirectMusicPort(iface); struct instrument *instrument_object; + struct region *instrument_region; HRESULT ret; BOOL on_heap; HANDLE download; @@ -312,22 +313,24 @@ static HRESULT WINAPI synth_port_DownloadInstrument(IDirectMusicPort *iface, IDi instrument_info->ulCopyrightIdx = 0; /* FIXME */ instrument_info->ulFlags = 0; /* FIXME */ - for (i = 0; i < nb_regions; i++) + i = 0; + LIST_FOR_EACH_ENTRY(instrument_region, &instrument_object->regions, struct region, entry) { DMUS_REGION *region = (DMUS_REGION*)(data + offset); offset_table->ulOffsetTable[1 + i] = offset; offset += sizeof(DMUS_REGION); - region->RangeKey = instrument_object->regions[i].header.RangeKey; - region->RangeVelocity = instrument_object->regions[i].header.RangeVelocity; - region->fusOptions = instrument_object->regions[i].header.fusOptions; - region->usKeyGroup = instrument_object->regions[i].header.usKeyGroup; + region->RangeKey = instrument_region->header.RangeKey; + region->RangeVelocity = instrument_region->header.RangeVelocity; + region->fusOptions = instrument_region->header.fusOptions; + region->usKeyGroup = instrument_region->header.usKeyGroup; region->ulRegionArtIdx = 0; /* FIXME */ region->ulNextRegionIdx = i != (nb_regions - 1) ? (i + 2) : 0; region->ulFirstExtCkIdx = 0; /* FIXME */ - region->WaveLink = instrument_object->regions[i].wave_link; - region->WSMP = instrument_object->regions[i].wave_sample; - region->WLOOP[0] = instrument_object->regions[i].wave_loop; + region->WaveLink = instrument_region->wave_link; + region->WSMP = instrument_region->wave_sample; + region->WLOOP[0] = instrument_region->wave_loop; + i++; } ret = IDirectMusicSynth8_Download(This->synth, &download, (void*)data, &on_heap);
1
0
0
0
Rémi Bernon : dmusic: Use a struct list for instrument articulations.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: febe6a78102ad30c425c9fd1ce328fe32f84e35e URL:
https://gitlab.winehq.org/wine/wine/-/commit/febe6a78102ad30c425c9fd1ce328f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Aug 31 21:32:06 2023 +0200 dmusic: Use a struct list for instrument articulations. --- dlls/dmusic/dmusic_private.h | 9 ++----- dlls/dmusic/instrument.c | 60 ++++++++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/dlls/dmusic/dmusic_private.h b/dlls/dmusic/dmusic_private.h index 4eae993f259..bdc86b6883c 100644 --- a/dlls/dmusic/dmusic_private.h +++ b/dlls/dmusic/dmusic_private.h @@ -79,11 +79,6 @@ typedef struct instrument_region { BOOL loop_present; } instrument_region; -typedef struct instrument_articulation { - CONNECTIONLIST connections_list; - CONNECTION *connections; -} instrument_articulation; - /***************************************************************************** * ClassFactory */ @@ -186,8 +181,8 @@ struct instrument /* instrument data */ BOOL loaded; instrument_region *regions; - ULONG nb_articulations; - instrument_articulation *articulations; + + struct list articulations; }; static inline struct instrument *impl_from_IDirectMusicInstrument(IDirectMusicInstrument *iface) diff --git a/dlls/dmusic/instrument.c b/dlls/dmusic/instrument.c index 5677f128060..a65826976f3 100644 --- a/dlls/dmusic/instrument.c +++ b/dlls/dmusic/instrument.c @@ -25,6 +25,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); static const GUID IID_IDirectMusicInstrumentPRIVATE = { 0xbcb20080, 0xa40c, 0x11d1, { 0x86, 0xbc, 0x00, 0xc0, 0x4f, 0xbf, 0x8f, 0xef } }; +struct articulation +{ + struct list entry; + CONNECTIONLIST list; + CONNECTION connections[]; +}; + +C_ASSERT(sizeof(struct articulation) == offsetof(struct articulation, connections[0])); + static HRESULT WINAPI instrument_QueryInterface(LPDIRECTMUSICINSTRUMENT iface, REFIID riid, LPVOID *ret_iface) { TRACE("(%p)->(%s, %p)\n", iface, debugstr_dmguid(riid), ret_iface); @@ -74,12 +83,16 @@ static ULONG WINAPI instrument_Release(LPDIRECTMUSICINSTRUMENT iface) if (!ref) { - ULONG i; + struct articulation *articulation, *next_articulation; free(This->regions); - for (i = 0; i < This->nb_articulations; i++) - free(This->articulations->connections); - free(This->articulations); + + LIST_FOR_EACH_ENTRY_SAFE(articulation, next_articulation, &This->articulations, struct articulation, entry) + { + list_remove(&articulation->entry); + free(articulation); + } + free(This); } @@ -125,6 +138,7 @@ HRESULT instrument_create(IDirectMusicInstrument **ret_iface) if (!(instrument = calloc(1, sizeof(*instrument)))) return E_OUTOFMEMORY; instrument->IDirectMusicInstrument_iface.lpVtbl = &instrument_vtbl; instrument->ref = 1; + list_init(&instrument->articulations); TRACE("Created DirectMusicInstrument %p\n", instrument); *ret_iface = &instrument->IDirectMusicInstrument_iface; @@ -244,35 +258,27 @@ static HRESULT load_region(struct instrument *This, IStream *stream, instrument_ static HRESULT load_articulation(struct instrument *This, IStream *stream, ULONG length) { - HRESULT ret; - instrument_articulation *articulation; - - This->articulations = realloc(This->articulations, sizeof(*This->articulations) * (This->nb_articulations + 1)); - if (!This->articulations) - return E_OUTOFMEMORY; + struct articulation *articulation; + CONNECTIONLIST list; + HRESULT hr; + UINT size; - articulation = &This->articulations[This->nb_articulations]; + if (FAILED(hr = read_from_stream(stream, &list, sizeof(list)))) return hr; + if (list.cbSize != sizeof(list)) return E_INVALIDARG; - ret = read_from_stream(stream, &articulation->connections_list, sizeof(CONNECTIONLIST)); - if (FAILED(ret)) - return ret; - - articulation->connections = malloc(sizeof(CONNECTION) * articulation->connections_list.cConnections); - if (!articulation->connections) - return E_OUTOFMEMORY; + size = offsetof(struct articulation, connections[list.cConnections]); + if (!(articulation = malloc(size))) return E_OUTOFMEMORY; + articulation->list = list; - ret = read_from_stream(stream, articulation->connections, sizeof(CONNECTION) * articulation->connections_list.cConnections); - if (FAILED(ret)) + size = sizeof(CONNECTION) * list.cConnections; + if (FAILED(hr = read_from_stream(stream, articulation->connections, size))) free(articulation); + else { - free(articulation->connections); - return ret; + subtract_bytes(length, sizeof(list) + sizeof(CONNECTION) * list.cConnections); + list_add_tail(&This->articulations, &articulation->entry); } - subtract_bytes(length, sizeof(CONNECTIONLIST) + sizeof(CONNECTION) * articulation->connections_list.cConnections); - - This->nb_articulations++; - - return S_OK; + return hr; } /* Function that loads all instrument data and which is called from IDirectMusicCollection_GetInstrument as in native */
1
0
0
0
Bartosz Kosiorek : gdiplus/tests: Extend DrawImage scaling tests.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: f0d2022b45758c9dfec91a8519c1bc8145e8ab41 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f0d2022b45758c9dfec91a8519c1bc…
Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Fri Sep 8 16:13:53 2023 +0200 gdiplus/tests: Extend DrawImage scaling tests. Changing the colour of the second pixel of the source bitmap clarifies the incorrect behaviour of PixelOffsetMode Half and HighQuality. This also provides better proof that PixelOffsetMode None and Fast are implemented correctly. --- dlls/gdiplus/tests/image.c | 61 +++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index cd409a0bad4..18fe8fcba37 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -4799,30 +4799,32 @@ static void test_image_format(void) static void test_DrawImage_scale(void) { - static const BYTE back_8x1[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_080[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_100[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_120[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_150[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_180[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_200[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_250[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40 }; - static const BYTE image_120_half[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_150_half[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_200_half[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40 }; - static const BYTE image_250_half[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40 }; + static const BYTE back_8x1[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_080[24] = { 0x40,0x40,0x40, 0x80,0x80,0x80, 0x40,0x40,0x40, 0x40,0x40,0x40, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_100[24] = { 0x40,0x40,0x40, 0x80,0x80,0x80, 0xcc,0xcc,0xcc, 0x40,0x40,0x40, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_120[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0xcc,0xcc,0xcc, 0x40,0x40,0x40, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_150[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, 0xcc,0xcc,0xcc, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_180[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, 0xcc,0xcc,0xcc, + 0xcc,0xcc,0xcc, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_200[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, 0xcc,0xcc,0xcc, + 0xcc,0xcc,0xcc, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_250[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, + 0xcc,0xcc,0xcc, 0xcc,0xcc,0xcc, 0xcc,0xcc,0xcc, 0x40,0x40,0x40 }; + static const BYTE image_120_half[24] = { 0x40,0x40,0x40, 0x80,0x80,0x80, 0xcc,0xcc,0xcc, 0xcc,0xcc,0xcc, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_150_half[24] = { 0x40,0x40,0x40, 0x80,0x80,0x80, 0x80,0x80,0x80, 0xcc,0xcc,0xcc, + 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_180_half[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, 0x80,0x80,0x80, + 0xcc,0xcc,0xcc, 0x40,0x40,0x40, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_200_half[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, 0x80,0x80,0x80, + 0xcc,0xcc,0xcc, 0xcc,0xcc,0xcc, 0x40,0x40,0x40, 0x40,0x40,0x40 }; + static const BYTE image_250_half[24] = { 0x40,0x40,0x40, 0x40,0x40,0x40, 0x80,0x80,0x80, 0x80,0x80,0x80, + 0x80,0x80,0x80, 0xcc,0xcc,0xcc, 0xcc,0xcc,0xcc, 0x40,0x40,0x40 }; static const struct test_data { REAL scale_x; @@ -4851,7 +4853,7 @@ static void test_DrawImage_scale(void) { 1.0, PixelOffsetModeHalf, image_100 }, { 1.2, PixelOffsetModeHalf, image_120_half, TRUE }, { 1.5, PixelOffsetModeHalf, image_150_half, TRUE }, - { 1.8, PixelOffsetModeHalf, image_180 }, + { 1.8, PixelOffsetModeHalf, image_180_half, TRUE }, { 2.0, PixelOffsetModeHalf, image_200_half, TRUE }, { 2.5, PixelOffsetModeHalf, image_250_half, TRUE }, @@ -4859,11 +4861,11 @@ static void test_DrawImage_scale(void) { 1.0, PixelOffsetModeHighQuality, image_100 }, { 1.2, PixelOffsetModeHighQuality, image_120_half, TRUE }, { 1.5, PixelOffsetModeHighQuality, image_150_half, TRUE }, - { 1.8, PixelOffsetModeHighQuality, image_180 }, + { 1.8, PixelOffsetModeHighQuality, image_180_half, TRUE }, { 2.0, PixelOffsetModeHighQuality, image_200_half, TRUE }, { 2.5, PixelOffsetModeHighQuality, image_250_half, TRUE }, }; - BYTE src_2x1[6] = { 0x80,0x80,0x80,0x80,0x80,0x80 }; + BYTE src_2x1[6] = { 0x80,0x80,0x80, 0xcc,0xcc,0xcc }; BYTE dst_8x1[24]; GpStatus status; union @@ -4908,7 +4910,10 @@ static void test_DrawImage_scale(void) todo_wine_if (!match && td[i].todo) ok(match, "%d: data should match\n", i); if (!match) - trace("%s\n", dbgstr_hexdata(dst_8x1, sizeof(dst_8x1))); + { + trace("Expected: %s\n", dbgstr_hexdata(td[i].image, sizeof(dst_8x1))); + trace("Got: %s\n", dbgstr_hexdata(dst_8x1, sizeof(dst_8x1))); + } } status = GdipDeleteGraphics(graphics);
1
0
0
0
Julian Rüger : po: Update German translation.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: dedbbcd5a0da68a3274b0bdc02ea29c2962ad53c URL:
https://gitlab.winehq.org/wine/wine/-/commit/dedbbcd5a0da68a3274b0bdc02ea29…
Author: Julian Rüger <jr98(a)gmx.net> Date: Sat Sep 9 14:53:37 2023 +0200 po: Update German translation. --- po/de.po | 148 +++++++++++++++++---------------------------------------------- 1 file changed, 40 insertions(+), 108 deletions(-)
1
0
0
0
Paul Gofman : server: Support FileStandardInformation for pipes.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: 733e4ca06e57cfc72fd59bbb5988c5ba3451adcf URL:
https://gitlab.winehq.org/wine/wine/-/commit/733e4ca06e57cfc72fd59bbb5988c5…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Sep 8 16:25:24 2023 -0600 server: Support FileStandardInformation for pipes. --- dlls/ntdll/tests/pipe.c | 21 +++++++++++++++++++++ server/named_pipe.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 072c3444c65..be2f30dfc7d 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2081,6 +2081,7 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state) IO_STATUS_BLOCK io; char buf[256] = "test"; NTSTATUS status, expected_status; + FILE_STANDARD_INFORMATION std_info; memset(&io, 0xcc, sizeof(io)); status = pNtQueryInformationFile(pipe, &io, &local_info, sizeof(local_info), FilePipeLocalInformation); @@ -2104,6 +2105,26 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state) is_server ? "server" : "client", state); } + status = pNtQueryInformationFile(pipe, &io, &std_info, sizeof(std_info), FileStandardInformation); + if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE) + ok(status == STATUS_PIPE_DISCONNECTED, + "NtQueryInformationFile(FileStandardInformation) failed in %s state %lu: %lx\n", + is_server ? "server" : "client", state, status); + else + ok(status == STATUS_SUCCESS, + "NtQueryInformationFile(FileStandardInformation) failed in %s state %lu: %lx\n", + is_server ? "server" : "client", state, status); + if (!status) + { + ok(std_info.AllocationSize.QuadPart == local_info.InboundQuota + local_info.OutboundQuota, + "got %I64u, expected %lu.\n", + std_info.AllocationSize.QuadPart, local_info.InboundQuota + local_info.OutboundQuota); + ok(std_info.EndOfFile.QuadPart == local_info.ReadDataAvailable, "got %I64u.\n", std_info.EndOfFile.QuadPart); + ok(std_info.NumberOfLinks == 1, "got %lu.\n", std_info.NumberOfLinks); + todo_wine ok(std_info.DeletePending, "got %d.\n", std_info.DeletePending); + ok(!std_info.Directory, "got %d.\n", std_info.Directory); + } + status = pNtQueryInformationFile(pipe, &io, &pipe_info, sizeof(pipe_info), FilePipeInformation); if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE) ok(status == STATUS_PIPE_DISCONNECTED, diff --git a/server/named_pipe.c b/server/named_pipe.c index 3adc79068ab..f3404a33c3b 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -598,6 +598,17 @@ static void pipe_end_flush( struct fd *fd, struct async *async ) } } +static data_size_t pipe_end_get_avail( struct pipe_end *pipe_end ) +{ + struct pipe_message *message; + data_size_t avail = 0; + + LIST_FOR_EACH_ENTRY( message, &pipe_end->message_queue, struct pipe_message, entry ) + avail += message->iosb->in_size - message->read_pos; + + return avail; +} + static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned int info_class ) { struct pipe_end *pipe_end = get_fd_user( fd ); @@ -670,8 +681,6 @@ static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned case FilePipeLocalInformation: { FILE_PIPE_LOCAL_INFORMATION *pipe_info; - struct pipe_message *message; - data_size_t avail = 0; if (!(get_handle_access( current->process, handle) & FILE_READ_ATTRIBUTES)) { @@ -709,9 +718,7 @@ static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned pipe_info->CurrentInstances = pipe->instances; pipe_info->InboundQuota = pipe->insize; - LIST_FOR_EACH_ENTRY( message, &pipe_end->message_queue, struct pipe_message, entry ) - avail += message->iosb->in_size - message->read_pos; - pipe_info->ReadDataAvailable = avail; + pipe_info->ReadDataAvailable = pipe_end_get_avail( pipe_end ); pipe_info->OutboundQuota = pipe->outsize; pipe_info->WriteQuotaAvailable = 0; /* FIXME */ @@ -720,6 +727,36 @@ static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned ? FILE_PIPE_SERVER_END : FILE_PIPE_CLIENT_END; break; } + case FileStandardInformation: + { + FILE_STANDARD_INFORMATION *std_info; + + if (!(get_handle_access( current->process, handle) & FILE_READ_ATTRIBUTES)) + { + set_error( STATUS_ACCESS_DENIED ); + return; + } + + if (get_reply_max_size() < sizeof(*std_info)) + { + set_error( STATUS_INFO_LENGTH_MISMATCH ); + return; + } + + if (!pipe) + { + set_error( STATUS_PIPE_DISCONNECTED ); + return; + } + + if (!(std_info = set_reply_data_size( sizeof(*std_info) ))) return; + std_info->AllocationSize.QuadPart = pipe->outsize + pipe->insize; + std_info->EndOfFile.QuadPart = pipe_end_get_avail( pipe_end ); + std_info->NumberOfLinks = 1; /* FIXME */ + std_info->DeletePending = 0; /* FIXME */ + std_info->Directory = 0; + break; + } default: default_fd_get_file_info( fd, handle, info_class ); }
1
0
0
0
Alexandre Julliard : ntdll: Don't save segment registers in the syscall frame on x86-64.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: 615d465bb1e124009272c0077cb1288be460c388 URL:
https://gitlab.winehq.org/wine/wine/-/commit/615d465bb1e124009272c0077cb128…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 11 11:50:37 2023 +0200 ntdll: Don't save segment registers in the syscall frame on x86-64. --- dlls/ntdll/unix/signal_x86_64.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index ff475585cda..71e23ae46fc 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -394,20 +394,16 @@ struct syscall_frame ULONG64 r14; /* 0060 */ ULONG64 r15; /* 0068 */ ULONG64 rip; /* 0070 */ - WORD cs; /* 0078 */ - WORD ds; /* 007a */ - WORD es; /* 007c */ - WORD fs; /* 007e */ + ULONG64 cs; /* 0078 */ ULONG64 eflags; /* 0080 */ ULONG64 rsp; /* 0088 */ - WORD ss; /* 0090 */ - WORD gs; /* 0092 */ - DWORD restore_flags; /* 0094 */ + ULONG64 ss; /* 0090 */ ULONG64 rbp; /* 0098 */ struct syscall_frame *prev_frame; /* 00a0 */ SYSTEM_SERVICE_TABLE *syscall_table; /* 00a8 */ DWORD syscall_flags; /* 00b0 */ - DWORD align[3]; /* 00b4 */ + DWORD restore_flags; /* 00b4 */ + DWORD align[2]; /* 00b8 */ XMM_SAVE_AREA32 xsave; /* 00c0 */ DECLSPEC_ALIGN(64) XSTATE xstate; /* 02c0 */ }; @@ -2592,7 +2588,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") "popq 0x80(%rcx)\n\t" __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") - "movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */ + "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ ".globl " __ASM_NAME("__wine_syscall_dispatcher_prolog_end") "\n" __ASM_NAME("__wine_syscall_dispatcher_prolog_end") ":\n\t" "movq %rax,0x00(%rcx)\n\t" @@ -2612,14 +2608,10 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "movq %r15,0x68(%rcx)\n\t" __ASM_CFI_REG_IS_AT2(r15, rcx, 0xe8, 0x00) "movw %cs,0x78(%rcx)\n\t" - "movw %ds,0x7a(%rcx)\n\t" - "movw %es,0x7c(%rcx)\n\t" - "movw %fs,0x7e(%rcx)\n\t" "movq %rsp,0x88(%rcx)\n\t" __ASM_CFI_CFA_IS_AT2(rcx, 0x88, 0x01) __ASM_CFI_REG_IS_AT2(rsp, rcx, 0x88, 0x01) "movw %ss,0x90(%rcx)\n\t" - "movw %gs,0x92(%rcx)\n\t" "movq %rbp,0x98(%rcx)\n\t" __ASM_CFI_REG_IS_AT2(rbp, rcx, 0x98, 0x01) /* Legends of Runeterra hooks the first system call return instruction, and @@ -2711,7 +2703,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, /* $rcx is now pointing to "frame" again */ __ASM_CFI(".cfi_restore_state\n") __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" - "movl 0x94(%rcx),%edx\n\t" /* frame->restore_flags */ + "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ "jz 1f\n\t" @@ -2738,7 +2730,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "xorl %edx,%edx\n\t" "xrstor64 0xc0(%rcx)\n\t" "movq %r11,%rax\n\t" - "movl 0x94(%rcx),%edx\n\t" + "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ "jmp 4f\n" "3:\tfxrstor64 0xc0(%rcx)\n" "4:\tmovq 0x98(%rcx),%rbp\n\t" @@ -2832,7 +2824,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "popq 0x70(%rcx)\n\t" /* frame->rip */ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") __ASM_CFI_REG_IS_AT2(rip, rcx, 0xf0,0x00) - "movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */ + "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ ".globl " __ASM_NAME("__wine_unix_call_dispatcher_prolog_end") "\n" __ASM_NAME("__wine_unix_call_dispatcher_prolog_end") ":\n\t" "movq %rbx,0x08(%rcx)\n\t" @@ -2868,7 +2860,6 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ "jz 2f\n\t" - "movw %fs,0x7e(%rcx)\n\t" "movq %gs:0x330,%rsi\n\t" /* amd64_thread_data()->pthread_teb */ "testl $8,%r14d\n\t" /* SYSCALL_HAVE_WRFSGSBASE */ "jz 1f\n\t" @@ -2895,7 +2886,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "movdqa 0x230(%rcx),%xmm13\n\t" "movdqa 0x240(%rcx),%xmm14\n\t" "movdqa 0x250(%rcx),%xmm15\n\t" - "testl $0xffff,0x94(%rcx)\n\t" /* frame->restore_flags */ + "testl $0xffff,0xb4(%rcx)\n\t" /* frame->restore_flags */ "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */
1
0
0
0
Alexandre Julliard : ntdll: Ignore attempts to change segment registers on x86-64.
by Alexandre Julliard
11 Sep '23
11 Sep '23
Module: wine Branch: master Commit: ea640f6cece7660ffc853b7d574fbe52af34901a URL:
https://gitlab.winehq.org/wine/wine/-/commit/ea640f6cece7660ffc853b7d574fbe…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 11 11:25:29 2023 +0200 ntdll: Ignore attempts to change segment registers on x86-64. --- dlls/ntdll/signal_x86_64.c | 4 -- dlls/ntdll/tests/exception.c | 31 +++++++-------- dlls/ntdll/unix/signal_x86_64.c | 85 ++++++++++++++++------------------------- 3 files changed, 47 insertions(+), 73 deletions(-)
1
0
0
0
← Newer
1
...
65
66
67
68
69
70
71
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200